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
list.dirs <- function(...) {
x <- dir(...)
x[file_test("-d", x)]
}
might be of use?
How might we do this recursively? (the recursive argument of dir breaks these functions because it never returns directory names, just the files within each directory, etc...).