By google I have found that the way to call R code is to use the following:
subprocess.call("Rscript" + " /path/Rscript.R")
# The reason there is an add statment is because in actual code I have a
variable of where the script is.
On my home computer such code works. I am now working on a Server machine. If while in the the direcotry of my code I run
Rscript /path/Rscript.R
it works. However when I try to run it from the python code I get No such file or Directory. I have made sure Rscript was in my path (because I could Run it from command line).
Any help would be appreciated.
I have tried running from ~/path to it, ./path to it, /absolutepathtoit.