get_files | R Documentation |
get_files
searches for matches to argument pattern
within each R file that is a descendant of parent directory dir
. It
works like a global find function that returns all R files within
dir
that match pattern
. Be careful not to choose a parent
directory has too many subdirectories and files.
get_files(dir, pattern = "", suffix = ".R$")
dir |
A character string that defines the root directory within which all R files will be analysed |
pattern |
A character string containing a regular expression to be matched in all R files found in the specified directory |
suffix |
A string with a pattern to filter the searched file endings. The default is ".R$" to only look for R-files. Use "." to search all files. |
Returns a character vector containing all files that match the pattern
Tobias Krabel
## Not run:
# Find all files in . that load packages through library
get_files(dir = ".", pattern = "library")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.