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
Use double quotes around the "%s" and single quotes around the robjects.r string:
"%s"
robjects.r('results = fetch(dbSendQuery(mydb, "%s"))') % (sql_scores)
or use the format() method:
format()
robjects.r('fetch(dbSendQuery(mydb, {0}))'.format(sql_scores))