listFiles | R Documentation |
This function lists only the files in a specified directory, excluding
directories. It is useful when you need to process or analyze only the files
within a directory without including subdirectories. The base::list.files()
function lists both files and directories, so this function provides a more
convenient way to obtain just the files.
listFiles(dirPath, ...)
dirPath |
Character. The path to the directory from which to list files. |
... |
Additional arguments passed to |
A character vector of file paths.
listFiles(getwd())
listFiles(getwd(), pattern = "\\.R$", recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.