Re: [R] Windows List of Folders?

From: Kenneth Hobson <khobson_at_aaahawk.com>
Date: Sat 30 Apr 2005 - 13:30:16 EST


Henrik, thanks! Your example worked fine.

Listed below is a sample of what I used and the output.
> path <- "C:/MyFiles/Approach/OMRL/Data/"
> pathnames <- list.files(path, full.names=F)
> isDir <- file.info(pathnames)$isdir
> isDir
 [1] TRUE TRUE TRUE FALSE FALSE FALSE FALSE
> dirs <- pathnames[isDir]
> dirs
[1] "3334" "d1" "NotUsedTemplates"
> files <- pathnames[!isDir]
> files

 [1] "O.zip"            "Sample21.adx"     "Sample21.apr"     "Sample21.dbf"   
	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Apr 30 14:07:06 2005

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