From searching, I see that calling R from Sage is pretty seamless. However, I cannot find information on calling Sage from R. For example, suppose that I have an R expression that I would like to differentiate, say
temp <- expression(x + x^2)
How can I send that to sage and have it differentiate it and send back an R expression? I would like the result to be pretty much equivalent to
D(temp,'x')
I have searched CRAN and google and have not found anything. I’m hoping there’s a better solution than something based on the system function. I have seen that there is support from R for yacas, but I am interested in Sage.
I use 64-bit Ubuntu.
Thanks!
I don’t know if this would work, but Sage libraries can be imported into Python, and Python can be interfaced with the
rJythonpackage. Could you call Sage functions throughrJython? It might not be as clean as theRyacasorrSymPypackages, but perhaps it will be good enough.Edit
Since Sage uses SymPy, you could interface with SymPy directly: