dot-expandPath: Expand system path

.expandPathR Documentation

Expand system path

Description

This function expands system paths (the non-absolute paths become absolute) and replaces the environment variables (e.g, ${HOME}) with their values.

Usage

.expandPath(path)

Arguments

path

file path to expand. Potentially any string

Details

Most importantly strings that are not system paths are returned untouched

Value

Expanded path or untouched string

Examples


string = "https://www.r-project.org/"
.expandPath(string)
path = "$HOME/my/path/string.txt"
.expandPath(path)

pepkit/pepr documentation built on Nov. 23, 2023, 5:54 a.m.