[R] About passing parameter to '.R' script file
Wolski
wolski at molgen.mpg.de
Fri Aug 27 13:22:29 CEST 2004
Hi!
You can do it indirectly e.g within a batch file.
a) set an envirovment variable (the path to the file)
b) access it from within you *.R script using ?Sys.getenv
Hope it helps.
Eryk
*********** REPLY SEPARATOR ***********
On 8/27/2004 at 4:36 PM Kishore, Tapake wrote:
>>>Hi,
>>>
>>>I am trying the 'R' application for generating the data for the uploaded
>>>'.gpr' file. I have written script file named 'test.R'. Currently i have
>>>hardcoded the path of uploaded '.gpr' file in the script itself.
>>>
>>>I would like to know how to pass a command line parameter to the
>>>'test.R' script file, so that i dont have to hardcode the path and
>>>filename of the '.gpr' files.
>>>Also, need to access these parameters inside the script file to use the
>>>path of the uploaded file.
>>>I am using below command to invoke the 'R' application by using the
>>>'test.R' script file.
>>>
>>>e.g.
>>>c:\\R\\rw1091\\bin\\R.exe CMD BATCH c:\\R\\rw1091\\bin\\test.R
>>>
>>>Expecting your suggestion on this.
>>>
>>>Thanks in advance.
>>>
>>>Regards,
>>>Kishore
>>>
>>>______________________________________________
>>>R-help at stat.math.ethz.ch mailing list
>>>https://stat.ethz.ch/mailman/listinfo/r-help
>>>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Dipl. bio-chem. Eryk Witold Wolski @ MPI-Moleculare Genetic
Ihnestrasse 63-73 14195 Berlin 'v'
tel: 0049-30-83875219 / \
mail: wolski at molgen.mpg.de ---W-W---- http://www.molgen.mpg.de/~wolski
More information about the R-help
mailing list