with_option: Evaluate an expression with temporary eplusr options

View source: R/options.R

with_optionR Documentation

Evaluate an expression with temporary eplusr options

Description

These functions evaluate an expression with temporary eplusr options

Usage

with_option(opts, expr)

with_silent(expr)

with_verbose(expr)

without_checking(expr)

Arguments

opts

A list of valid input for eplusr::eplusr_option().

expr

An expression to be evaluated.

Details

with_option evaluates an expression with specified eplusr options.

with_silent evaluates an expression with no verbose messages.

with_verbose evaluates an expression with verbose messages.

without_checking evaluates an expression with no checkings.

Examples

## Not run: 
path_idf <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")

# temporarily disable verbose messages
idf <- with_silent(read_idf(path_idf, use_idd("8.8", download = "auto")))

# temporarily disable checkings
without_checking(idf$'BuildingSurface:Detailed' <- NULL)
# OR
with_option(list(validate_level = "none"), idf$'BuildingSurface:Detailed' <- NULL)

## End(Not run)


eplusr documentation built on Aug. 25, 2023, 5:18 p.m.