Description Usage Arguments Value Examples
Not meant to be called directly
1 | .check_valid_util(util, utils = NULL, path = NULL)
|
util |
name of target located in path |
utils |
name of supported targets in path |
path |
path to directory |
safe path to util, or error if util does not exist
1 2 3 4 5 6 7 8 9 10 11 12 | if (.Platform$OS.type == "unix") {
# this will return /full/path/to/bin
# or return an error for all values of util that are not "ls" and "pwd"
# or error if "ls" does not exist in "/bin"
.check_valid_util("ls", utils = c("ls", "pwd"), "/bin")
## Not run:
# This will throw error
.check_valid_util("badUtil", utils = c("ls", "pwd"), "/bin")
## End(Not run)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.