This may be a very easy question for someone - I am able to use list.files()
to obtain a list of files in a given directory, but if I want to get a list of director
Just to update this thread:
I see that in the newer version of R (currently I'm using 2.5.1), there is now a list.dirs
function included in the base install:
list.dirs implicitly has all.files = TRUE, and if recursive = TRUE, the answer includes path itself (provided it is a readable directory).