ScalarParameter-class {oppr}R Documentation

Scalar parameter prototype

Description

This prototype is used to represent a parameter has a single value. Only experts should interact directly with this prototype.

Fields

$id

character identifier for parameter.

$name

character name of parameter.

$value

numeric scalar value.

$default

numeric scalar default value.

$class

character name of the class that ⁠$value⁠ should inherit from (e.g. integer).

$lower_limit

numeric scalar value that is the minimum value that ⁠$value⁠ is permitted to be.

$upper_limit

numeric scalar value that is the maximum value that ⁠$value⁠ is permitted to be.

$widget

function used to construct a shiny::shiny() interface for modifying values.

Usage

x$print()

x$show()

x$validate(x)

x$get()

x$set(x)

x$reset()

x$render(...)

Arguments

x

object used to set a new parameter value.

...

arguments passed to ⁠$widget⁠.

Details

print

print the object.

show

show the object.

validate

check if a proposed new set of parameters are valid.

get

extract the parameter value.

set

update the parameter value.

reset

update the parameter value to be the default value.

render

create a shiny::shiny() widget to modify parameter values.

See Also

Parameter, ArrayParameter.


[Package oppr version 1.0.4 Index]