get_file_path: Create a character string for an absolute, fully resolved...

Description Usage Arguments Details Value Examples

View source: R/get_file_path.R

Description

This function constructs a full file path string for use in reading from or writing to the file system. It is always using a base path by default, and adds any additional relative path under it when one is passed to the function.

Usage

1
get_file_path(relativePath = "")

Arguments

relativePath

Optional. A character string defining the relative path under the base path. See the Details section for more on the base path.

Details

The base path defaults to the user directory (~), and can be defined with an environment variable JT_LOCAL_PATH.

Value

A character string with the full expanded path (using path.expand.

Examples

1
2
3
4
5
get_file_path('my/storage/path')
get_file_path('my/storage/path/for/this_file.csv')

Sys.setenv(JT_LOCAL_PATH = '~/my/custom/storage/path')
get_file_path('for/this_file.csv')

matt-jay/rjaytools documentation built on May 28, 2019, 8:45 a.m.