opts: Global options for the intrval package

intrval-optionsR Documentation

Global options for the intrval package

Description

Options store and allow to set global values for the intrval functions.

Usage

intrval_options(...)

Arguments

...

Options to set.

Value

When parameters are set by intrval_options, their former values are returned in an invisible named list. Such a list can be passed as an argument to intrval_options to restore the parameter values. Tags are the following:

  • use_fpCompare: use the fpCompare package for the reliable comparison of floating point numbers.

Examples

str(intrval_options())

x1 <- 0.5 - 0.3
x2 <- 0.3 - 0.1

# save old values and set the new one
op <- intrval_options(use_fpCompare = FALSE)

# this is the base R behavior
x1 
x2 

# reset defaults
intrval_options(op)

# using fpCompare
x1 
x2 


psolymos/intrval documentation built on Oct. 12, 2024, 1:40 p.m.