"...was to go aloft to the working top..." Yep, but their major job was to keep the OR's in line. The Real Marines used muskets just like the Army. No rifles. Too slow to reload and rifles cost too much. The Baker was first ordered in 1800 so there wouldn't have been any on RN ships in 1800.
"...merchants/privateers..." Likely used muskets for the same reason. Money and speed of reloading. Mind you, there's no reason to think that a commercial ship wouldn't have a rifle or two.