Compute relative path

rel_path(path, base = ".")

Arguments

path

Relative path

base

Base path

Examples

rel_path("a/b", base = "here")
#> [1] "here/a/b"
rel_path("/a/b", base = "here")
#> [1] "/a/b"