if (FALSE) {
# lists names of files and directories in the main directory
wd_dir(r)
# lists names of files and directories in the subdirectory "mydirectory"
wd_dir(r, "mydirectory")
# lists names of files and directories with the relative path
wd_dir(r, "mydirectory", full_names=TRUE)
# returns a data.frame with the columns filename, size and isdir (whether
# it's a directory or file
wd_dir(r, "mydirectory", as_df=TRUE)
}
Run the code above in your browser using DataLab