abs2rel {nat.utils}R Documentation

Remove common part of two paths, leaving relative path

Description

Remove common part of two paths, leaving relative path

Usage

abs2rel(path, stempath = getwd(), StopIfNoCommonPath = FALSE)

Arguments

path

Paths to make relative

stempath

Root to which path will be made relative

StopIfNoCommonPath

Error if no path in common

Value

Character vector containing relative path

Author(s)

jefferis

See Also

path.expand, normalizePath

Other path_utils: common_path(), split_path()

Examples

path = "/Volumes/JData/JPeople/Sebastian/images"
abs2rel(path,'/Volumes/JData')

[Package nat.utils version 0.6.1 Index]