Learn R Programming

pathological (version 0.0-8)

standardize_path: Standardize paths

Description

Standardi[sz]e path names so that they can be more easily compared.

Usage

standardize_path(x = dir(), sep = c("/", "\\"), include_names = TRUE)

standardise_path(x = dir(), sep = c("/", "\\"), include_names = TRUE)

Arguments

x
A character vector of file paths. Defaults to files in the current directory.
sep
String separator between directory levels in the output.
include_names
A logical value indicating whether the output should be named with the input file paths.

Value

  • A character vector of paths, pointing to the same locations as the input, but in a standardized form.

See Also

normalizePath, path.expand, getAbsolutePath

Examples

Run this code
standardize_path(c(".", "..", "~", R.home(), NA))
standardize_path(c(".", "..", "~", R.home(), NA), "\\")

Run the code above in your browser using DataLab