A friend has some R scripts that may be useful. But I use Python, and when it updates its scripts, I want to use its updates.
Can i embed as-is R scripts in Python?
A typical R-script that he can write is called, for example, quadro.R and looks like:
quadro <- function(x) {
return(x*x)}
Is there any way to call quadro.R from python with argument "3" and get the result "9" in Python? I have R installed on my Linux system.
As I understand rpy / rpy2 , can I use R commands in python but not use R script, or am I misunderstood something? Is there any other way to use R-script from Python?
source
share