Learn R Programming

fs (version 1.2.2)

path: Construct path to a file or directory

Description

Construct path to a file or directory

Usage

path(..., ext = "")

Arguments

...

character vectors, if any values are NA, the result will also be NA.

ext

An optional extension to append to the generated path.

path

A character vector of one or more paths.

See Also

path_home(), path_package() for functions to construct paths relative to the home and package directories respectively.

Examples

Run this code
# NOT RUN {
path("foo", "bar", "baz", ext = "zip")

path("foo", letters[1:3], ext = "txt")
# }

Run the code above in your browser using DataLab