Hi, this REY button corresponds to REY Nº 1 Infantry Regiment (Infantería de Línea), it is according 1805 uniformity regulation, this design of button changed in 1815.
I am not sure but I think that this regiment was not destined to America, they were in Spain during war against Napoleon army (1808-1814).
Cool find, congratulations