# NOT RUN {
# Create a function that generates a quantitative parameter
# corresponding to the number of subgroups.
num_subgroups <- function(range = c(1L, 20L), trans = NULL) {
new_quant_param(
type = "integer",
range = range,
inclusive = c(TRUE, TRUE),
trans = trans,
label = c(num_subgroups = "# Subgroups"),
finalize = NULL
)
}
num_subgroups()
num_subgroups(range = c(3L, 5L))
# Custom parameters instantly have access
# to sequence generating functions
value_seq(num_subgroups(), 5)
# }
Run the code above in your browser using DataLab