Re: [R] [Rscript] difficulty passing named arguments from commandline

2012-09-09 Thread Tom Roche
https://github.com/TomRoche/GEIA_to_netCDF/commit/62ad6325d339c61ac4e7de5e7d4d26fa21ed918c >> # - Rscript ./netCDF.stats.to.stdout.r netcdf.fp="./GEIA_N2O_oceanic.nc" >> var.name="emi_n2o" >> # fails >> # + Rscript ./netCDF.stats.to.stdout.r 'netcdf.fp="./GEIA_N2O_oceanic.nc"' >> 'var.name="emi

Re: [R] [Rscript] difficulty passing named arguments from commandline

2012-09-07 Thread William Dunlap
args[4])) > objects() [1] "args" "dataFile" "logFile" "stringVar" "var3" > dataFile [1] "./file.txt" > logFile [1] "./file.log" > stringVar [1] "var3 is 0.333" > var3 [1] 0.3333333

Re: [R] [Rscript] difficulty passing named arguments from commandline

2012-09-06 Thread Ben Tupper
Hi Tom, Using the script below I had no trouble. Here's an example Minke:R ben$ Rscript --no-init-file ./argCatcher.rs ./the=trouble .with=./args is=the.y argue ./the=trouble .with=./args is=the.y argue # script starts here # argumentCatcher.rs args = commandArgs(trailing = TRUE) cat(args, se

[R] [Rscript] difficulty passing named arguments from commandline

2012-09-06 Thread Tom Roche
Wanting a commandline solution (for a problem detailed @ http://mailman.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2012/msg00279.html ) I turned to Rscript, and whacked out the q'n'd https://github.com/TomRoche/GEIA_to_netCDF/blob/master/netCDF.stats.to.stdout.r However it wasn't as q