Description Usage Arguments Value Examples
Given a character vector of filenames, check how many of them currently exist. Optionally, can keep checking for a specified amount of time, at a given frequency
1 2 3 | check_files(filenames, folder = "", warn_only = FALSE,
continual = FALSE, sleep_time = 30, sleep_end = (60 * 3),
display_pct = 75)
|
filenames |
A character vector of filenames (specify full paths if you are checking files that are not in present working directory) |
folder |
An optional character containing the folder name that contains the files you want to check (if used, do not include folderpath in the filenames characters). If not specified, will search in present working directory. |
warn_only |
Boolean (T/F), whether to end with a warning message as opposed to an error message if files are still missing at the end of the checks. |
continual |
Boolean (T/F), whether to only run once or to continually keep checking for files for sleep_end minutes. Default = F. |
sleep_time |
numeric (seconds); if continual = T, specify the number of seconds to wait in-between file checks. Default = 30 seconds. |
sleep_end |
numeric (minutes); if continual = T, specify number of minutes to check at sleep_time intervals before terminating. Default = 180 minutes. |
display_pct |
numeric (0-100); at what percentage of files found do you want to print the full list of still-missing files? Default = 75 percent of files. |
Prints the number of files that match. If warn_only = T, returns a character vector of missing files
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.