He studied medicine and natural science at Edinburgh University, and after returning from a trip to Australia and New Zealand, ran a practice in London for some time.
Treaties were signed with the two black Princes of Eboe and Iddah, agreeing to the abolition of the slave trade and of human sacrifices, and the signatories were then left to resume their normal practices.
An extract from a letter written on board the "Æthiope" on 21 October 1841 - "We entered the Nun on the 10th inst., and proceeded up the river the next morning, and fell in with the "Albert" on the evening of the 13th inst.
We found her in a worse state than the "Wilberforce"; all hands down with fever but for Drs M'William, Stanger, a scientific gentleman, a marine, the boatswain's mate, and a servant.
The heat of the engine-room affected the engineer so much as to throw him back in his convalescence, and prevent him rendering any further assistance, but Dr. Stanger took the vessel safely below Eboe, without anything going wrong with the machinery."
He came highly commended by the Secretary of State for the Colonies, and immediately started on surveying the route for the proposed road joining Cape Town to Grahamstown.