createEnvi: Define and create a project environment

Description Usage Arguments Value Author(s) See Also Examples

Description

Defines folder structures and creates them if necessary, loads libraries, and sets other project relevant parameters.

Usage

1
2
3
4
5
6
7
createEnvi(root_folder = tempdir(), folders = c("data", "data/tmp"),
  folder_names = NULL, git_repository = NULL,
  git_subfolders = c("src", "doc"), path_prefix = "path_",
  global = FALSE, libs = NULL, fcts_folder = NULL,
  source_functions = !is.null(fcts_folder), alt_env_id = NULL,
  alt_env_value = NULL, alt_env_root_folder = NULL, lut_mode = FALSE,
  create_folders = TRUE)

Arguments

root_folder

root directory of the project.

folders

list of subfolders within the project directory.

folder_names

names of the variables that point to subfolders. If not provided, the base paths of the folders is used.

git_repository

name of the project's git repository. Will be added to the folders and subfolders defined in default "lut" or supplied by user will be created.

git_subfolders

subdirectories within git repository that should be created.

path_prefix

a prefix for the folder names.

global

logical: export path strings as global variables?

libs

vector with the names of libraries

fcts_folder

path of the folder holding the functions. All files in this folder will be sourced.

source_functions

logical: should functions be sourced?

alt_env_id

alternative system environment attribute used to check for setting an alternative root_folder.

alt_env_value

value of the attribute for which the alternative root directory of the project should be set.

alt_env_root_folder

alternative root directory.

lut_mode

use predefined environmental settings. In this case, only the name of the git repository must be supplied to the function.

create_folders

create folders if not existing already.

Value

A list containing the project settings.

Author(s)

Christoph Reudenbach, Thomas Nauss

See Also

alternativeEnvi()

Examples

1
2
3
4
5
6
7
## Not run: 
createEnvi(root_folder = "~/edu", folders = c("data/", "data/tmp/"),
libs = c("link2GI"),
alt_env_id = "COMPUTERNAME", alt_env_value = "PCRZP",
alt_env_root_folder = "D:\\BEN\\edu")

## End(Not run)

envima/envimaR documentation built on May 5, 2019, 7:09 a.m.