input_slider | R Documentation |
Create an interactive slider.
input_slider(
min,
max,
value = (min + max)/2,
step = NULL,
round = FALSE,
format = NULL,
locale = "us",
ticks = TRUE,
animate = FALSE,
sep = ",",
pre = NULL,
post = NULL,
label = "",
id = rand_id("slider_"),
map = identity
)
min , max |
The minimum and maximum values (inclusive) that can be selected. |
value |
The initial value of the slider, either a number, a date
(class Date), or a date-time (class POSIXt). A length one vector will
create a regular slider; a length two vector will create a double-ended
range slider. Must lie between |
step |
Specifies the interval between each selectable value on the
slider. Either |
round |
|
format |
A string specifying how to format the value. |
locale |
A string specifying the locale to use for formatting. |
ticks |
|
animate |
|
sep |
Separator between thousands places in numbers. |
pre |
A prefix string to put in front of the value. |
post |
A suffix string to put after the value. |
label |
Display label for the control, or |
id |
A unique identifier for this input. Usually generated automatically. |
map |
A function with single argument |
Other interactive input:
input_checkbox()
,
input_select()
,
input_text()
input_slider(0, 100)
input_slider(0, 100, label = "binwidth")
input_slider(0, 100, value = 50)
# Supply two values to value to make a double-ended sliders
input_slider(0, 100, c(25, 75))
# You can use map to transform the outputs
input_slider(-5, 5, label = "Log scale", map = function(x) 10 ^ x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.