ploc: Package File Path Location

Description Usage Arguments Value See Also Examples

View source: R/ploc.R

Description

A wrapper for file.path that allows the user to (1) set a package directory location and (2) supply a package name and a file path is constructed. This is the inverse of basename + dirname.

Usage

1
ploc(base, dir = getOption("dir"))

Arguments

base

The base name (package name).

dir

The location to place base. This can be set in the user's options in the ‘.Rprofile’; for example:
options(dir = file.path(Sys.getenv("USERPROFILE"), "GitHub")).

Value

Returns a concatenated file path using dir and base.

See Also

file.path, basename, dirname

Examples

1
2
3
4
5
## Not run: 
options(dir = file.path(Sys.getenv("USERPROFILE"), "Desktop"))
pax(ploc("DELETE_ME"))

## End(Not run)

trinker/pax documentation built on March 21, 2018, 3:01 a.m.