check_dir | R Documentation |
This function checks whether a directory exists and, if not, returns an informative error message. The inputted directory can be edited with the addition of a '/' if requested.
check_dir(arg = deparse(substitute(input)), input, check_slash = FALSE)
arg |
(optional) A character string which defines the argument of a parent function. |
input |
A character string which defines a directory. |
check_slash |
A logical input that defines whether or not to check the end of the directory string for '/'. If |
The function checks whether or not a directory exists. If so, the function returns either the directory as inputted, or the directory with a '/' added to the end. If not, the function returns an informative error message.
Edward Lavender
This function is taken from the ‘utils.add’ package (https://github.com/edwardlavender/utils.add). It is defined separately in flapper
to reduce reliance on non-default packages.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.