I am putting here the documentation which helps me to interface R with sagemath.
I think it is very interesting to enjoy the best of Python and R for mathematical and statistical analysis. Readings I advise to read carefully:
- Interfaces to R on the sagemath documentation. The examples of function are really helpful.
- The R page on the sagemath wiki which gives other useful examples.
Of course, you also can rely on the introduction to R on the CRAN’s website to know how to code in R. Just do not forget that the syntax slightly differs in sagemath.