I have a problem on how to run a python script from Rstudio?
My initial idea is to grab the python script from a GitHub repository then run it in R, I grabbed python code by using script <- getURL(URL, ssl.verifypeer = FALSE), from RCurl package, I was stuck on how to run Python code without storing the script as a file in the working directory, that is, running the R variable script above directory in Rstudio.
I did know python.load() in _rPython_ package in R could help to run Python script, but it requires the .py file as the first argument. I would like to find a way without storing the Python script as a file.
Thank you in advance if you have any idea of this problem.
scriptobject? What does the objectscriptlook like?reticulatepackage: blog.rstudio.com/2018/03/26/reticulate-r-interface-to-pythonsystem("python path/to/script.py")scriptfromscript <- getURL(URL, ssl.verifypeer = FALSE)is a character vector, it's all the content (codes) in that URL.