From rpeng at jhsph.edu  Tue Apr  4 17:42:33 2006
From: rpeng at jhsph.edu (Roger D. Peng)
Date: Tue, 04 Apr 2006 11:42:33 -0400
Subject: [Rd] request to add argv[0]
In-Reply-To: <50d1c22d0604040821n53cc6df5g24ae0e4b67e91688@mail.gmail.com>
References: <50d1c22d0604040821n53cc6df5g24ae0e4b67e91688@mail.gmail.com>
Message-ID: <443293E9.3020608@jhsph.edu>



ivo welch wrote:
> Dear R Developers:  This has come up repeatedly in the r-help mailing
> list, most recently in a thread started by myself.  The answers have
> been changing over the years.  Would it be possible and easy for R to
> offer a global read-only option that gives the name of the currently
> executing R script, i.e., the equivalent of argv[0] in C?

Isn't that just `commandArgs()[1]'?  I must be misunderstanding your question.

> 
>   (PS: An even better mechanism would be the ability to pick off multiple
>    arguments following the .R file, different from commandArgs(),
>    but this is not as important and probably more difficult as it would change
>    the invokation syntax of R.)
> 
> sincerely,
> 
> /ivo welch
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 

-- 
Roger D. Peng  |  http://www.biostat.jhsph.edu/~rpeng/



[Rd] request to add argv[0]
Roger D. Peng