[tech-spec] Re: R arguments

  • From: Dirk Eddelbuettel <edd@xxxxxxxxxx>
  • To: tech-spec@xxxxxxxxxxxxx
  • Date: Wed, 13 Oct 2004 12:20:54 -0500

On Wed, Oct 13, 2004 at 09:19:07AM -0700, BBands wrote:
> Is there a way to pass arguments to an R script? 
> Something like: source('script.R', arg1, arg2)

Steve and Daniel answered already cmdline args and global vars. Another
variant may be to rewrite what you have in script.R, define a function foo
and then do

   source('script.R');  foo(arg1, arg2)

Does that help?


Those are my principles, and if you don't like them... well, I have others.
                                                -- Groucho Marx

Other related posts: