Re: [R] How to get a list of subdirectories in the wd?

2010-06-01 Thread Henrique Dallazuanna
Try this: dir()[file.info(dir())$isdir] On Tue, Jun 1, 2010 at 11:06 PM, Nevil Amos wrote: > How do I get a list of subdirectories only, not files, in a directory > > > dir.create("test") > setwd("test") > dir.create("adir") > dir.create("bdir") > file.create("afile") > dir() > > returns [1] "

[R] How to get a list of subdirectories in the wd?

2010-06-01 Thread Nevil Amos
How do I get a list of subdirectories only, not files, in a directory dir.create("test") setwd("test") dir.create("adir") dir.create("bdir") file.create("afile") dir() returns [1] "adir" "afile" "bdir" in need to return [1] "adir" "bdir" cheers Nevil Amos _