The
These functions produce a character vector of the names of files or directories in the named directory.
You can see further readings in the following link.
list.files(path = ".", pattern = NULL, all.files = FALSE,
full.names = FALSE, recursive = FALSE,
ignore.case = FALSE, include.dirs = FALSE, no.. = FALSE) dir(path = ".", pattern = NULL, all.files = FALSE,
full.names = FALSE, recursive = FALSE,
ignore.case = FALSE, include.dirs = FALSE, no.. = FALSE)
list.dirs(path = ".", full.names = TRUE, recursive = TRUE)
Copy and Run the sample code in your Rstudio to see how list.files() and list.dirs() function works.
DO NOT CLICK RUN
list.files()
list.dirs()