Re: [R] Command line arguments with source() - Windows OS

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Tue, 18 Nov 2008 09:49:46 -0500

On Tue, Nov 18, 2008 at 4:09 AM, Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk_at_idi.ntnu.no> wrote:
> Wacek Kusnierczyk wrote:
>> Duncan Murdoch wrote:
>>
>>> paramValue <- 15
>>> source("myRfile.R")
>>>
>>> The quotes are necessary, because source(myRfile.R) would go looking
>>> for a variable named myRfile.R, rather than using "myRfile.R" as the
>>> filename.
>>>
>>
>> why?
>
> i see this question has been ignored, but i was quite serious. the
> question was not technical ("how does it happen that source(file) will
> look up a variable called 'file' rather than open a file called
> 'file'?") but rather about the design ("why do some functions, e.g.,
> source, require a character string, while others deparse the expression
> and can take an unquoted variable name?"). that is, what is the
> criterion you use to decide that myfancynewfunction(argument) should
> behave one or the other way? is the criterion documented anywhere, or
> is it just i-wish-so that decides in each single case?
>

Surely this has already been well discussed in the last few days in general and this is only a particular case of that.

See the article linked to in that thread.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 18 Nov 2008 - 14:53: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 Tue 18 Nov 2008 - 15:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive