At the close of the Afghan war, Robert and his mother accompanied his father's battery to Sipri, whence they removed to Morar in Gwalior. In 1850, he was placed at school at Mussoorie under Robert North Maddock, where he remained until 1 December 1856. He was then sent to England, and was placed at Kensington Grammar School under G. Frost. Thence he obtained a cadetship, and after one term at the Royal India Military College, Addiscombe, and two at the Royal Military Academy at Woolwich he obtained his commission in the royal regiment of artillery on 18 December 1861. In 1862, he was sent to India and stationed with the 1st battery of the 24th brigade at Fort Govindghar, the fortress of Amritsar. In August 1864, he exchanged into the F battery of the 18th brigade and was stationed at Mian Mir. In 1866, the failure of the Agra and Masterman's Bank left him with only his pay to support himself and his mother. To increase his resources he exchanged into the 21st Punjab infantry. This regiment was then under orders for the Abyssinian campaign, and disembarked at Zoula on 1 February 1868.