camr_build_path: Build a File/Directory Path Optionally create a directory or...

camr_build_pathR Documentation

Build a File/Directory Path Optionally create a directory or apply camr_name_file to the generated file path. Use shorthand "root" directories as specified in the project config.yml.

Description

Build a File/Directory Path Optionally create a directory or apply camr_name_file to the generated file path. Use shorthand "root" directories as specified in the project config.yml.

Usage

camr_build_path(
  ...,
  root = NULL,
  lgl_verify = TRUE,
  lgl_create = FALSE,
  lgl_name = FALSE
)

Arguments

...

Arguments to be passed to file.path.

lgl_verify

Verify that the path already exists?

lgl_create

Create a directory at the path if it does not exist?

lgl_name

Apply camr_name_file on the last argument?

chr_root

Directory named in local-directories of the project's config.yml.

Value

(Character) A vector of paths.

Examples

## Not run: 
write.csv(
  iris, camr_build_path('data', 'Example.csv', lgl_name=T, lgl_verify=F)
)

camr_build_path(root='dropbox', 'fNIRS', 'Source')

## End(Not run)

rettopnivek/camrprojects documentation built on March 26, 2024, 9:17 a.m.