standardize_path: Standardize paths

Description Usage Arguments Details Value See Also Examples

View source: R/standardize.R

Description

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

Usage

1
2
3
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.

Details

standardize_path wraps normalizePath, providing additional tweaks to the output.

Value

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

See Also

normalizePath, path.expand, file_path_as_absolute, getAbsolutePath

Examples

1
2
standardize_path(c(".", "..", "~", R.home(), NA))
standardize_path(c(".", "..", "~", R.home(), NA), "\\")

richierocks/pathological documentation built on May 27, 2019, 8:47 a.m.