[R] Can't there be a cd command?
Duncan Murdoch
murdoch at stats.uwo.ca
Wed May 10 18:56:23 CEST 2006
On 5/10/2006 12:15 PM, Jan T. Kim wrote:
> On Wed, May 10, 2006 at 11:26:55AM -0400, Duncan Murdoch wrote:
>> On 5/10/2006 11:10 AM, Gabor Grothendieck wrote:
>> > On 5/10/06, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
>
>> >> What is it that you find objectionable about having a default for the
>> >> file argument in read.table? I think Martin has said that he doesn't
>> >> want non-UI functions to be involved with UI functions, but I don't see
>> >> that: if your code works now, it will be completely unaffected by
>> >> setting a default for the argument. (Sorry if I summarized the argument
>> >> incorrectly, Martin, I didn't look it up.)
>> >
>> > That would be my objection too. UI should not be tied to the non-UI core.
>> > Its basically a loose coupling argument.
>>
>> I don't accept that argument, because in R everything* is interactive.
>> There isn't a non-UI core. The function arguments are part of the user
>> interface.
>
> It seems to me that there might be a misunderstanding here; as the term
> "user" is used to refer to a person interacting with the computer on
> the one hand, and to refer to a programmer using R on the other hand.
One of the design goals of S and R is to blur the distinction between
users and programmers. It is a continuum. R is designed to gently urge
non-programmers to become programmers, because the designers think
that's the way statistical computing should be done.
> Everything being "part of the user interface", in the sense of
> every user-visible function being part of the API, does not and should
> not imply that everything should be interactive.
No, I didn't suggest that. What I was suggesting is that it should be
*convenient* to use read.table interactively, not that it should be
required. (It's already possible, but not convenient, especially for a
beginner who doesn't know the secret incantation.)
> In my experience, interactivity is a rather double-edged thing: On the
> one hand, it facilitates learning and exploration, but on the other
> hand, its improper use is frequently detrimental to reproducibility of
> scientific computation.
I definitely agree with that. It should be convenient to use R
non-interactively as well. Anyone who wants reproducibility should be
writing packages and scripts or vignettes that run non-interactively.
That's why I am emphasizing that this change will have no effect on
existing code. I wouldn't suggest it if it did.
Duncan Murdoch
More information about the R-help
mailing list