get_output_dir: Get the desired output directory

Description Usage Arguments Details Value Author(s) Examples

View source: R/package_functions.R

Description

Gets a standard output directory path to be used for saving data and graphical objects based on the folder path of the R script the function is used in.

Usage

1
get_output_dir(doc = F, file = NULL, inFolder = NULL)

Arguments

doc

Boolean (T, F) indicator of whether to set the output directory to the "Output" folder (used for R scripts calling the function) or the "Documentation" folder (used for Rmd scripts calling the function).

Details

The output directory will be selected to mimic the structure of the Codes folder (created at the set up of the project) and any subfolders created afterwords. If the R script exists in "Users/alexhubbard/Project/Codes/Model1" then the output directory will be "Users/alexhubbard/Project/Output/Model1". If an script is insted an Rmd file, the output directory will change to "Users/alexhubbard/Project/Documentation/Model1".

Value

A character string giving a full folder path for the desired output directory.

Author(s)

Alex Hubbard (hubbard.alex@gmail.com)

Examples

1
2
3
link_file()
get_output_dir()
get_output_dir(doc = T)

opendoor-labs/projectmap documentation built on Oct. 8, 2019, 1:58 p.m.