Try this: row.names(subset(file.info(list.files()), !isdir))
On Tue, Jun 23, 2009 at 4:06 PM, Jason Rupert <jasonkrup...@yahoo.com>wrote: > > Is there any way to make list.files(getwd()) or > list.files(getwd(),full.names=TRUE) stop returning directories? > > Right now both appear to return both file names and folders within the > location. > > I would like for it only to return file names and not folders. > > I am using this on Windows with R version 2.9.0 (2009-04-17). > > Thank you again for all your help and any feedback. > > Jason > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.