The element f should be an element of some base ring of R.
A special feature is that if f is rational, and R is not an algebra over QQ, then an element of R is provided by attempting the evident division.
See also baseRings.