Add r.object

Closes #1857
Review 1127 by @mlucy