what is the meaning of "in the affections of" in this context?
This strange, eccentric, and formidable man had his proper environment in the 17th century, when his prototypes were holding moorland meetings in Gallo way and avoiding, or possibly even attacking with the arms of the flesh, the dragoons of Claverhouse. But, live when he might, he was bound to write his nacre in some fashion on the annals of his time. We read of his strenuous youth in Scotland, of his rivalry with his friend Carlyle in the affections of the clever and vivacious Jane Welsh, of his enormous walks and feats of strength, of his short career as a rather violent school-teacher at Kirkcaldy, of his marriage to the daughter of a minister in that town, and finally of his becoming curate or assistant to the great Dr. Chalmers, who was, at that time, the most famous clergyman in Scotland, and whose administration of his parish in Glasgow is one of the outstanding chapters in the history of the Scottish Church. In this capacity he gained that man-to-man acquaintance with the poorer classes which is the best and most practical of all preparations for the work of life. Without it, indeed, no man is complete.