[R] set choose.files directory?

mdusaire at umn.edu mdusaire at umn.edu
Wed Sep 23 20:57:13 CEST 2009


Hi,

I've been trying to set the directory for choose.files as follows:

[R2.9.0 running on XP]

setwd("C:/Documents and Settings/2/Data")
getwd()

infile2 = choose.files(filters = Filters[c("txt","All"),], caption = 
"Choose ECD datafile")
#<...do a bunch of stuff...>

It appears the working directory isn't updated until after choose.files() 
executes. getwd() returns the correct path, as set by setwd(), but the path 
does not appear to be used by choose.files() unless I execute 
choose.files() a second time.

Help.  Thanks.

Martin




More information about the R-help mailing list