@Ella Hibb,
Yes, it is compatible with Pentax K-r.
It is a sharp lens, sells at a discount around $420 (USD), reasonably water-resistant, and is good for sports and action.
Furthermore, Pentax is one of the manufacturers that provide image stabilization in the camera body rather than making it a feature of lenses. The system automatically detects the focal length of the attached lens and optimizes for it.
That being said if you happen to be looking for a lens that focuses closer than 5 to 6 feet, this is not the right lens for you. If you do any close work like flowers, insects or nature closeups, this is not the right lens.