When parsing arguments for %R the rmagic extension requires the units argument (-u / --units) to be an integer, but the parameter is supposed to be one of ["px", "in", "cm", "mm"] and thus it is impossible to pass this argument.
["px", "in", "cm", "mm"]
I think you're right. Do you want to submit a pull request? Just click 'edit this file' on rmagic.py. It will also need a little tweak around line 510, because we'll need to pass that argument with quotation marks around it.
Closed by PR #2617.