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.RYou can try using the very
UNOFFICIALmoduleInitR package which basically acts as a bootstrap.
Fully supported R interface to the Unix Environment Module System