hugo_save_investigation: Save variables and information about packages

Description Usage Arguments Author(s) Examples

Description

The hugo_save_investigation saves variables and versions of packages used in investigation. Data is stored in subfolder resources/session_name in two separate files: variables and packages. Restoring data and loading saved versions of packages could be done by using function hugo_continue_investigation.

Usage

1
2
hugo_save_investigation(variables = NULL, session_name = NULL,
  envir = .GlobalEnv)

Arguments

variables

a character vector containing names of important variables to be saved. By default variables = NULL, what means that all the variables in environment envir are saved.

session_name

name of directory in which the session will be saved. If session_name = NULL, the dafault name is set.

envir

an environment to search for objects to be saved. Global Environment by default.

Author(s)

Monika Chudek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: hugo_start_investigation("Example")
model <- lm(Petal.Width~., data = iris)
res <- model$residuals
petal.pred <- predict(model, newdata = iris)
hugo_save_investigation()

# or select variables to be written out and set name of session's directory:
hugo_save_investigation( variables = c('petal.pred', 'res'), session_name = 'IrisModel')

# or select the environment that contains variables for saving
e <- new.env()
e$a <- FALSE
e$b <- "a"
expect_output(hugo_save_investigation(envir = e))

## End(Not run)

pbiecek/hugo documentation built on May 12, 2019, 6:24 p.m.