range_validate

0th

Percentile

Tools for working with parameter ranges

Tools for working with parameter ranges

Usage
range_validate(object, range, ukn_ok = TRUE)

range_get(object, original = TRUE)

range_set(object, range)

Arguments
object

An object with class quant_param.

range

A two-element numeric vector or list (including Inf). Values can include unknown() when ukn_ok = TRUE

ukn_ok

A single logical for wether unknown() is an acceptable value.

original

A single logical: should the range values be in the natural units (TRUE) or in the transformed space (FALSE, if applicable).

Value

range_validate returns the range if it passes the validation process (and throws an error otherwise). range_get returns also returns the range of the object. range_set returns an updated version of the parameter object.

Aliases
  • range_validate
  • range_get
  • range_set
Examples
# NOT RUN {
library(dplyr)
my_lambda <- 
  penalty %>% 
  value_set(-4:-1) 
try(my_lambda %>% range_validate(c(-10, NA)), silent = TRUE) %>% print()

range_get(my_lambda)

range_set(my_lambda, c(-10, 2)) %>% range_get()
# }
Documentation reproduced from package dials, version 0.0.2, License: GPL-2

Community examples

Looks like there are no examples yet.