A friend has some R-scripts that I might find useful. But I use Python, and when he upgrades his scripts I want to be able to use his updates.
Is it possible to embed R-scripts as-is in Python?
An typical R-script he might write is named e.g. quadro.R and has the form:
quadro <- function(x) {
return(x*x)}
Can I somehow call quadro.R from python with the argument "3" and get the result "9" back in Python? I do have R installed on my Linux system.
As I understand rpy/rpy2, I can use R-commands in python but not use an R-script, or did I misunderstood something? Is there some other way to use an R-script from within Python?