HI, All, As we know when we use R to execute a r program we can add arguments like '--args p1 p2'. But when I am sourcing another file, is there a way to set up some arguments for the sourced program. Thanks! Regards, [[alternative HTML version deleted]]
Jiqiang Guo <guojq28 <at> gmail.com> writes:> As we know when we use R to execute a r program we can add arguments like > '--args p1 p2'. But when I am sourcing another file, is there a way to set > up some arguments for the sourced program. Thanks! >In general, you can use Sys.getenv() and .setenv() to pass parameters from the command line. passw=Sys.getenv("PASSW") But when sourcing, why not simply use R? mypass = "secret" source("myfile.r") Dieter