DEPRECATED: The Environment Module System v4 introduces support for fish, lisp, tcl and R code output. The R interface works great:

https://github.com/cea-hpc/modules/blob/master/init/r.R.in

After installation it can typically be found here: /usr/share/Modules/init/r.R

You can try using the very UNOFFICIAL moduleInitR package which basically acts as a bootstrap.

No Maintenance Intended

RenvModule

Fully supported R interface to the Unix Environment Module System