get_config: get_config helper function

Description Usage Arguments Value Examples

View source: R/get_config.R

Description

Internal function to read config files

Usage

1
get_config(config_file, config_key, logfile_dir, headless)

Arguments

config_file

A character string. The path to the config.yml-file containing the database configuration.

config_key

A character string. The name of the corresponding database. This string must be conform with the corresponding config section in the config.yml-file.

logfile_dir

(Optional, String, default: "tempdir()") The absolute path to folder where the logfile will be stored.

headless

(Optional, Boolean, default: TRUE) Indicating, if the function is run only in the console (headless = TRUE) or on a GUI frontend (headless = FALSE).

Value

If successful it returns the config, Null otherwise.

Examples

1
2
3
4
5
6
7
utils_path <- tempdir()
config <- get_config(
  config_file = paste0(utils_path, "/MISC/email.yml"),
  config_key = "email",
  logfile_dir = tempdir(),
  headless = TRUE
)

miracum/misc-dizutils documentation built on Nov. 21, 2020, 7:41 p.m.