hugo_save_investigation.Rd
hugo_save_investigation saves variables and packages used in investigation. Data is stored in subfolder 'resources/session_name' in two separate files: _variables_ and _packages_ Written data can be read back at later date by using function _hugo_continue_investigation_.
hugo_save_investigation(variables = NULL, session_name = NULL, envir = .GlobalEnv)
variables | a character vector containing names of important variables to be saved. By default _variables = NULL_, then 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. |
# 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)) # }