Learn R Programming

intrval (version 1.0-0)

intrval-options: Global options for the intrval package

Description

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

Usage

intrval_options(...)

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.

Arguments

...

Options to set.

Examples

Run this code
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 

Run the code above in your browser using DataLab