Learn R Programming

vitals (version 0.1.0)

vitals_log_dir: The log directory

Description

vitals supports the VITALS_LOG_DIR environment variable, which sets a default directory to write logs to in Task's $eval() and $log() methods.

Usage

vitals_log_dir()

vitals_log_dir_set(dir)

Value

Both vitals_log_dir() and vitals_log_dir_set() return the current value of the environment variable VITALS_LOG_DIR. vitals_log_dir_set()

additionally sets it to a new value.

To set this variable in every new R session, you might consider adding it to your .Rprofile, perhaps with usethis::edit_r_profile().

Arguments

dir

A directory to configure the environment variable VITALS_LOG_DIR to.

Examples

Run this code
vitals_log_dir()

dir <- tempdir()

vitals_log_dir_set(dir)

vitals_log_dir()

Run the code above in your browser using DataLab