create_output_folder: Create output folder

View source: R/create_output_folder.R

create_output_folderR Documentation

Create output folder

Description

Create output folder

Usage

create_output_folder(data_name, results_dir = NULL)

Arguments

data_name

String. Will be used for the name of the created output folder.

results_dir

A string with the path to the directory where results are to be stored or can be found. For example, if the data in question is (to be) stored in ⁠folder_with_res/$data_name⁠, then results_dir should be "folder_with_res". Defaults to NULL, which indicates the default directories are to be used. Default directories are: * ⁠$HOME/results/$data_name⁠ if on the cluster * ⁠getwd()/results/$data_name⁠ if called from another environment If is.na(results_dir), then the object is returned to the R session and not saved to file.

Value

Creates appropriate directory. Returns string with path for output object. By default, if on Hábrók, folder will be ⁠$HOME/results/$data_name⁠. If called from another environment, folder will be ⁠getwd()/results/$data_name⁠. Alternatively, another valid root can be specified, resulting in ⁠results_dir/$data_name⁠.

Author(s)

Pedro Santos Neves

Examples

## Not run: 
create_output_folder(
  data_name = "results_folder"
)

## End(Not run)

tece-lab/DAISIEutils documentation built on Jan. 31, 2024, 12:09 p.m.