Learn R Programming

pathological (version 0.1-1)

is_windows_drive: Is the path a Windows drive?

Description

Checks to see if the path is a Windows drive.

Usage

is_windows_drive(x)

Arguments

x
A character vector of file paths. Defaults to files in the current directory.

Value

A logical vector, TRUE when the path is a Windows drive name. On non-Windows machines, the return value is FALSE everywhere.

See Also

get_drive

Examples

Run this code
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))

Run the code above in your browser using DataLab