Learn R Programming

gooseR (version 0.1.2)

with_goose_session: Execute code with automatic gooseR session management

Description

Execute code with automatic gooseR session management

Usage

with_goose_session(expr, cleanup = TRUE, session_id = NULL)

Value

Result of expression

Arguments

expr

Expression to evaluate

cleanup

Logical, whether to clean up after execution

session_id

Optional session identifier

Examples

Run this code
if (FALSE) {
# Run analysis with automatic cleanup
result <- with_goose_session({
  goose_save(mtcars, "cars", category = "temp")
  goose_save(iris, "flowers", category = "temp")
  # Do analysis...
  "Analysis complete"
}, cleanup = TRUE)
}

Run the code above in your browser using DataLab