Any scrimmage kick out of bounds, any where, next belongs to R.
3rd down kick recovered behind the line by K is K's ball, 4th down. Doesn't matter if it went beyond the line or not as long as R didn't touch it beyond the line.
If R touched beyond line then it is a new 1st and 10 for team in possession at end of down.
Of course, both punts and field goals are scrimmage kicks and therefore treated the same.