Passing vectors and params from Python to R functions
问题 I am learning Python and R and am having an issue passing parameters from Python to an R function named "Contours". The below works..... Python (testr.py) import rpy2.robjects as robjects robjects.r(''' source('Wrapper.R') ''') r_myfunc = robjects.globalenv['Contours'] r_myfunc() R (Wrapper.R) source ('./DrawCompRecVark.R') imageDirectory="./tmp/" Contours <- function() { k=c(0,1) sens=c(0.8, 0.9, 0.95, 0.995) spec=0.8 prev=0.001 N=1 uniqueId=1 #graph prepareSaveGraph(imageDirectory,