Re: [R] Setting working directory interactively within a function

From: Duncan Murdoch <>
Date: Sat 15 Oct 2005 - 03:24:13 EST

On 10/14/2005 1:08 PM, Berton Gunter wrote:
> ?setwd
> e.g. setwd(file.choose())
> BTW, you could have found this on your own via'working
> directory') . Base R has quite good docs -- you should try them first.
> -- Bert Gunter

That won't work in Windows, where the dialogs don't consider directories to be files so won't return them.

As far as I know no platform lets you setwd() to a file (even though this might make sense: setwd("foo") could mean change to foo if it's a directory, to the directory it's in if it's a file).

Duncan Murdoch mailing list PLEASE do read the posting guide! Received on Sat Oct 15 03:34:36 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:45 EST