Create a new Parameter object.

new_parameter(
  name,
  status = TRUE,
  value = 0,
  min_value = 0,
  max_value = 100,
  step_value = 1,
  hide = FALSE,
  units = "",
  id = uuid::UUIDgenerate()
)

Arguments

name

character Name for parameter.

status

logical status for parameter.

value

numeric initial value. Defaults to 0.

min_value

numeric minimum value. Defaults to 0.

max_value

numeric maximum value.

step_value

numeric step value. Defaults to 1.

hide

logical value indicating if the slider should be hidden when the parameter is disabled. Defaults to FALSE.

units

character units. Defaults to an empty character object.

id

character identifier for object.

Value

A Parameter object.

Examples

# create a new parameter
p <- new_parameter(name = "Spatial clustering")

# print object
print(p)
#> Parameter
#>   id:       673021fd-687e-4705-8849-761cd94fab07
#>   name:     Spatial clustering
#>   status:   TRUE
#>   value:   0