Description Usage Arguments Value Note See Also Examples
Checks to see if the path is a Windows drive.
1 |
x |
A character vector of file paths. Defaults to files in the current directory. |
A logical vector, TRUE
when the path is a Windows drive name.
On non-Windows machines, the return value is FALSE
everywhere.
The check is done by regular expression: values are considered to be
Windows drive name if they consist of a letter followed by a colon,
optionally followed by a slash or backslash.
Paths are standardardized before checking, so .
and ..
are
resolved to their actual locations rather than always returning FALSE
.
1 2 3 | x <- c("c:", "c:/", "c:\\", "C:", "C:/", "C:\\", "c:/c", "cc:", NA)
# Warnings about OS suppressed so package checks pass on non-Windows systems.
suppressWarnings(is_windows_drive(x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.