I found that Robert was a clerk in the Quartermasters Department of the War Department, assigned to Camargo, Mexico earning $60 per month. I’d guess this is a civilian position.
I found this information in
"The Register of all Officers and Agents, Civil, Military, and Naval, in the Service of the United States on the Thirtieth September, 1847, with the names, force, and condition of all ships and vessels belonging to the United States, and when and where built; together with the names and compensation of all printers in any way employed by Congress, or any department or officer of the government."
Prepared at the Department of State, in pursuance of Resolutions of Congress of April 27, 1816, and July 14, 1832. Washington: J. & G.S. Gideon, Printers. 1847
This document is sometimes called "The Blue Book" or "the Official Register of the United States." It's a gold mine for diplomatic service, quartermaster, post masters, etc. listed by name.