I am using the Windows command line interface to run my R program. For some reason I'm unable to pass multiple arguments at a same time. This is what I'm trying to execute:
Statement on CMD look like this;
C:\Program Files\R\R-3.3.3\bin\i386> Rscript
C:\Users\Public\Command_Line.R "2017-07-04 14:13:25", "2017-07-04 15:36:40", "0000-0000-0000-0000","1","0"
I get the following error on execution:
C:\Program Files\R\R-3.3.3\bin\i386> Rscript C:\Users\Public\Command_Line.R "2017-07-04 14:13:25", "2017-07-04
15:36:40", '0000-0000-0000-0000', 1, 0
Loading required package: methods
Error in args[1] : object of type 'closure' is not subsettable
Calls: subset -> subset.data.frame -> eval -> eval
Execution halted
Actual program is mentioned below;
args<-commandArgs(FALSE)
xsub <- subset(d, d$properties$appuserid == args[3] &
d$properties$devicedate >= args[1] &
d$properties$devicedate <= args[2] &
d$properties$location$building == args[4] &
d$properties$location$floor == args[5]);