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

From: Joerg van den Hoff <>
Date: Wed 10 May 2006 - 19:04:42 EST

Issac Trotts wrote:

> On 5/9/06, Prof Brian Ripley <> wrote:

>> On Wed, 10 May 2006, Peter Dalgaard wrote:
>>> "Issac Trotts" <> writes:
>>>> 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?
>>> Well, on Linux et al., the normal mode of operation is to start R from
>>> the commmand line in the directory where you want to be. On Windows
>>> you start from a desktop icon or a menu entry, which implies that
>>> you're always in the same directory, and usually the wrong one.
>> Exactly. I don't think I have ever used setwd() on Linux.
>> Also, I have never seen this asked before for a Unix-alike, so it seems
>> not to be a >F<AQ. There is a common tendency for users who run into a
>> problem to think everyone does too, and it isn't necessarily so.
>> Frequently asked questions do make it to the FAQs: it is a defence
>> mechanism for the volunteers supporting R.
>>"directory") gets you there.
> OK, good to know.  Thanks for helping.
> ______________________________________________
> mailing list
> PLEASE do read the posting guide!

probably this has used up sufficient disk space in the mail archive already, but anyway a bit of support to the initial request: one of the very first things I did, when I started using R, was adding

cd <- setwd
pwd <- getwd

to my .Rprofile. and when I encouraged colleagues to try R out, the 'top three' questions where

"how can I get out? I tried ^C, exit(), quit(), but nothing works"
"how can I change the directory? `cd' does'nt work"
"where am I? `pwd' does'nt work" (`pwd' is something like a 'local
speciality', I presume...)

this is of course a marginal obstacle for new users, but avoidable all the same. (and maybe most people (like myself) in the first place don't think it important enough to post it -- maybe it _would_ be in the FAQ otherwise...)

so, _if_ 'cd' would be recognized in future releases, it would'nt do any harm, would it?

joerg mailing list PLEASE do read the posting guide! Received on Wed May 10 19:10:36 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 Thu 11 May 2006 - 00:10:04 EST.

Mailing list information is available at Please read the posting guide before posting to the list.