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

From: Steve Buyske <buyske_at_stat.rutgers.edu>
Date: Wed 10 May 2006 - 10:42:01 EST

I believe Berton Gunter was trying to be helpful, as you didn't mention your operating system, rather than suggesting that Linux users read the Windows FAQ.

However, when I type (under OS X)

     help.search("directory")

the 6th line returned is

     getwd(base) Get or Set Working Directory

which seems clear enough.

Steve Buyske

At 3:11 PM -0700 5/9/06, Issac Trotts wrote:
>I'm on Linux, so it didn't occur to me to look in the Windows FAQ
>until it came up in the Google search. Why should Windows users be
>the only ones who learn how to change directories?
>
>Issac
>
>On 5/9/06, Berton Gunter <gunter.berton@gene.com> wrote:
>> You do not say, but if you are on Windows see the R for Windows FAQ 2.14
>> where getwd() is explicitly mentioned. setwd() is on the same man page.
>>
>> Also the R for Windows File menu has a "Change dir ..." entry. So I think R
>> core has already taken care of this, at least on Windows.
>>
>> -- Bert Gunter
>> Genentech Non-Clinical Statistics
>> South San Francisco, CA
>>
>> "The business of the statistician is to catalyze the scientific learning
>> process." - George E. P. Box
>>
>>
>>
>> > -----Original Message-----
>> > From: r-help-bounces@stat.math.ethz.ch
>> > [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Issac Trotts
>> > Sent: Tuesday, May 09, 2006 2:51 PM
>> > To: r-help@stat.math.ethz.ch
>> > Subject: [R] Can't there be a cd command?
>> >
>> > R is quite a powerful environment. Here's a small way it
>> > could be even better.
>> >
>> > I wanted to change the working directory, so I tried the obvious thing
>> >
>> > > cd("foo")
>> > Error: couldn't find function "cd"
>> >
>> > Then I looked for `directory' in the FAQ but found nothing. A search
>> > for directory in the introduction also turned up nothing.
>> >
>> > A Google search for "gnu R change directory" brought up a link to the
>> > Windows FAQ, and there was the answer: setwd. Oddly enough, setwd is
>> > not mentioned in the general FAQ, the introduction, or the language
>> > definition.
>> >
>> > Hopefully someone can add a mention of setwd to the general FAQ or the
>> > intro. Even better would be to have a cd() command, since that's what
>> > almost every beginner will try first.
>> >
>> > ______________________________________________
>> > R-help@stat.math.ethz.ch mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide!
>> > http://www.R-project.org/posting-guide.html
>> >
>>
>>
>
>______________________________________________
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed May 10 10:47:45 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 10 May 2006 - 12:10:13 EST.

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