Create a new Parameter object.
Usage
new_parameter(
name,
status = TRUE,
value = 0,
min_value = 0,
max_value = 100,
step_value = 1,
hide = FALSE,
disable = FALSE,
units = "",
reference_value = NA_real_,
reference_units = "",
tool_tip = "",
id = uuid::UUIDgenerate()
)Arguments
- name
characterName to display.- status
logicalThe initial status value. This is used to display information on whether the feature is selected (or not) for subsequent analysis. Defaults toTRUE.- value
numericinitial value. Defaults to 0.- min_value
numericminimum value. Defaults to 0.- max_value
numericmaximum value.- step_value
numericstep value. Defaults to 1.- hide
logicalindicating if the slider should be hidden when the setting switch is on. Defaults toFALSE.- disable
logicalindicating if the setting should be disabled. Defaults toFALSE.- units
characterunits. Defaults to an emptycharacterobject.- reference_value
numericreference value. This parameter is useful if thevalueis a relative value, because the total expected amount (i.e.reference_value * value) can be reported. Defaults toNA_real_indicating that no reference value information should be reported.- reference_units
characterunits for the reference value. Defaults to "".- tool_tip
characterdescription of parameter setting.- id
characterunique identifier. Defaults to a random identifier (uuid::UUIDgenerate()).
Value
A Parameter object.
Examples
# create a new parameter
p <- new_parameter(name = "Spatial clustering")
# print object
print(p)
#> Parameter
#> id: 21491f0b-d7bd-4531-96b4-c242d90cc3f8
#> name: Spatial clustering
#> status: TRUE
#> value: 0
#> reference_value: NA