makePath: Path-function generator.

Description Usage Arguments Value Examples

View source: R/makePath.R

Description

This function creates another function that paste the directory set up in the call to makePath to the argument passed in the current call, allowing better directory parametrazion, auto-explaining code and less typing. See example for usage.

Usage

1
makePath(path)

Arguments

path

Base path of interest.

Value

A function that paste the directory set up in the call to makePath to the argument passed in the current call.

Examples

1
2
3
4
5
6
res.dir <- makePath("results")
tmp.dir <- makePath("/tmp")

## Eg for use with write.csv() or pdf()
res.dir("my_results.csv")
tmp.dir("graph.pdf")

lbraglia/yapomif documentation built on May 20, 2019, 11:26 p.m.