Is the Pentax smc D FA Macro 100mm f/2.8 Weather-Resistant Macro lens compatible with the K-r body, and is this going to be a good buy for sharp close up insect/nature shots etc?
Yes, it is compatible. The Pentax K-r has the usual PENTAX K (KAF2) bayonet mount and the smc DA 100/2.8 WR has Pentax KAF. Nearly all Pentax K items are compatible to each other, including backwards compatibility for it's additional features.
is this going to be a good buy for sharp close up insect/nature shots etc?
It has a 1:1 magnification, which means that the object you are photographing has the same size on the sensor. The minimal focus length is 30.3cm, at 100 mm. Note that the camera has a crop factor of ~1.5x, so the focal length compared to 35mm film is 150mm. Also, as it is weather resistant, you can shoot in rain, humid and dusty conditions and in wet grass.