in reply to Re^2: Passing parameters to R script
in thread Passing parameters to R script
I tried to get it working (I come from Python and I'm used to the syntax) but in the end I settled for the easier (and working) 'getopt' solution:install.packages('optparse') ?optparse
install.packages('getopt') . . . if(require("getopt", quietly=TRUE)) { opt <- getopt(matrix(c('path', 'p', 1, "character"), ncol=4, byrow=TRUE)) if(!is.null(opt$path)) path <- opt$path }
|
|---|