Re: [R] how to source file with arugments

From: Dieter Menne <>
Date: Thu, 06 Nov 2008 07:11:32 +0000 (UTC)

Jiqiang Guo <guojq28 <at>> 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.


But when sourcing, why not simply use R?

mypass = "secret"

Dieter mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 06 Nov 2008 - 07:13:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 06 Nov 2008 - 07:30:25 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive