Vladimir Eremeev
2007-Aug-30 13:18 UTC
[R] How to mask or escape "=" in Windows command prompt?
I have defined a function with several arguments and have it stored in the .RData file. The 'function head' is defined as follows EstimALIConc <-function(sdname,SZ,W,farea,watri,biomodel,start.part=1,nparts=20,method=c("optim","DEoptim")) { [ blah-blah-blah ] (function body doesn't matter) } Then I call Rscript: e:> rscript --restore -e "EstimALIConc('17-aug',27.8,5,1,watri,biomodel,1,100,method='DEoptim');warnings();" 1>17-aug-log.txt 2>17-aug.err and get the error in the 17-aug.err: Error in -args : invalid argument to unary operator Execution halted If I remove "method=" from the function call, then everything works fine, and function executes. e:> rscript --restore -e "EstimALIConc('17-aug',27.8,5,1,watri,biomodel,1,100,'DEoptim');warnings();" 1>17-aug-log.txt 2>17-aug.err The problem seems to be that the equality sign acts as a separator. How to avoid this? This would allow skiping of the default arguments, for example start.part -- View this message in context: http://www.nabble.com/How-to-mask-or-escape-%22%3D%22-in-Windows-command-prompt--tf4354195.html#a12407015 Sent from the R help mailing list archive at Nabble.com.