I have basic R script that performs a GLM on a MySQL dataset. This runs fine using Rscript in bash. However I would like to call it within a python script so I can add it to a l
You can access variables in the R environment with robjects.globalenv['varname']. So an alternative way is:
robjects.globalenv['varname']
robjects.globalenv['sql_scores'] = sql_scores robjects.r("results = fetch(dbSendQuery(mydb, sql_scores))")