if (interactive()) {
toppings <- checkbox(
c("Pepperoni", "Mushrooms", "Olives"),
prompt = "Select toppings:"
)
# With pre-selection
options <- checkbox(
c("Option A", "Option B", "Option C"),
selected = c(1, 3)
)
# With scrolling for long lists
items <- checkbox(1:100, max_visible = 10)
# With select all feature
methods <- checkbox(
c("method_a", "method_b", "method_c"),
allow_select_all = TRUE,
prompt = "Select methods to run:"
)
}
Run the code above in your browser using DataLab