Skip to content
Back to formatted view

Raw Message

Message-ID: <434FE9BD.3020709@stats.uwo.ca>
Date: 2005-10-14T17:24:13Z
From: Duncan Murdoch
Subject: Setting working directory interactively within a function
In-Reply-To: <200510141708.j9EH8V5Y001712@volta.gene.com>

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 help.search('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