[R] Can't there be a cd command?

Jan T. Kim jtk at cmp.uea.ac.uk
Wed May 10 21:31:48 CEST 2006


On Wed, May 10, 2006 at 12:56:23PM -0400, Duncan Murdoch wrote:
> 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.

That's an idea I like very much too -- much better than the currently
popular idea of "protecting" users from the "unfriendliness" of
programming, anyway...

> > 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.)

Well, not knowing a secret is always inconvenient...  ;-)

> > 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. 

Ok, I fully agree with this -- seems that I've interpreted the statement
that "in R everything is interactive" a bit too narrowly.

> That's why I am emphasizing that this change will have no effect on 
> existing code.  I wouldn't suggest it if it did.

That's an important point too, obviously.

I'm not entirely convinced about the convenience aspect, as I find file
choosers of all sorts disruptive to workflow... but that's perhaps a
matter of personal taste.

Best regards, Jan
-- 
 +- Jan T. Kim -------------------------------------------------------+
 |             email: jtk at cmp.uea.ac.uk                               |
 |             WWW:   http://www.cmp.uea.ac.uk/people/jtk             |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*




More information about the R-help mailing list