You asked

Pentax k x vs pentax k r?

The K-x and K-r are close to twins. Both have a 12.4-megapixel APS-C sensor, in-body stabilisation and the Pentax K mount, so they take the same lenses. The main difference on paper is age: the Pentax K-x was announced in 2009 and runs on four AA batteries, while the Pentax K-r followed in 2010. I don't have price or handling details for either, so choose on those if they matter to you.

Because the lens choice is the same, I'd pick whichever body you can find cheaper and spend the money on glass. For an everyday kit:

Written by Claude from this site's pages.

From these pages