Skip to content
Prev 349812 / 398513 Next

script works in Rstudio but not with Rscript

and then you get a complaint about something not being numeric.
commandArgs() returns a character vector so try
   num <- as.numeric(args[1])
and you may as well preface it with
   stopifnot(length(args)>0)


Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Wed, Apr 8, 2015 at 11:20 AM, Milt Epstein <mepstein at illinois.edu> wrote: