Re: [R] extracting file names

2011-03-25 Thread MacQueen, Don
While I think David's suggestion is better, because it's more readable, this should also work: dat <- read.table(file.name <- file.choose(), header = FALSE) Note the assignment inside the function call. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Liverm

Re: [R] extracting file names

2011-03-23 Thread David Wolfskill
On Thu, Mar 24, 2011 at 03:49:32PM +1300, Darcy Webber wrote: > Dear R users, > > I am trying to figure out a way to extract the original file name of a > .DAT (e.g., IC48.DAT) file imported into R using the file.choose() > function, i.e., > > dat <- read.table(file.choose(), header = FALSE) > >