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 quick as hoped, because I spent quite a bit of time figuring out how to pass the arguments. This works (note the quoting): $ Rscript ./netCDF.stats.to.stdout.r 'netcdf.fp="./GEIA_N2O_oceanic.nc"' 'var.name="emi_n2o"' > For ./GEIA_N2O_oceanic.nc var=emi_n2o > cells=64800 > obs=36143 > min=5.96e-08 > max=1.17e+03 > mean=99.5 > med=67.7 but this fails roche@amad1:/project/inf14w/roche/GEIA_to_netCDF $ Rscript ./netCDF.stats.to.stdout.r 'netcdf.fp=./GEIA_N2O_oceanic.nc' 'var.name=emi_n2o' > Error in eval(expr, envir, enclos) : object '.' not found > Calls: eval -> eval > Execution halted and this fails roche@amad1:/project/inf14w/roche/GEIA_to_netCDF $ Rscript ./netCDF.stats.to.stdout.r netcdf.fp="GEIA_N2O_oceanic.nc" var.name="emi_n2o" > Error in eval(expr, envir, enclos) : > object 'GEIA_N2O_oceanic.nc' not found > Calls: eval -> eval > Execution halted and this fails roche@amad1:/project/inf14w/roche/GEIA_to_netCDF $ Rscript ./netCDF.stats.to.stdout.r netcdf.fp=./GEIA_N2O_oceanic.nc var.name=emi_n2o > Error in eval(expr, envir, enclos) : object '.' not found > Calls: eval -> eval > Execution halted Must the quoting be so strict/brittle, or am I missing something? Also, It Would Be Nice if there was more in the `help(Rscript)` examples about argument passing. I for one found the current examples quite terse and unhelpful. TIA, Tom Roche <tom_ro...@pobox.com> ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.