1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/inputs.R
\name{input_slider}
\alias{input_slider}
\title{Create an interactive slider.}
\usage{
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
)
}
\arguments{
\item{min}{The minimum value (inclusive) that can be selected.}
\item{max}{The maximum value (inclusive) that can be selected.}
\item{value}{The initial value of the slider. A numeric vector of length one
will create a regular slider; a numeric vector of length two will create a
double-ended range slider. A warning will be issued if the value doesn't
fit between \code{min} and \code{max}.}
\item{step}{Specifies the interval between each selectable value on the
slider (if \code{NULL}, a heuristic is used to determine the step size). If
the values are dates, \code{step} is in days; if the values are times
(POSIXt), \code{step} is in seconds.}
\item{round}{\code{TRUE} to round all values to the nearest integer;
\code{FALSE} if no rounding is desired; or an integer to round to that
number of digits (for example, 1 will round to the nearest 10, and -2 will
round to the nearest .01). Any rounding will be applied after snapping to
the nearest step.}
\item{format}{Deprecated.}
\item{locale}{Deprecated.}
\item{ticks}{\code{FALSE} to hide tick marks, \code{TRUE} to show them
according to some simple heuristics.}
\item{animate}{\code{TRUE} to show simple animation controls with default
settings; \code{FALSE} not to; or a custom settings list, such as those
created using \code{\link[shiny:sliderInput]{animationOptions()}}.}
\item{sep}{Separator between thousands places in numbers.}
\item{pre}{A prefix string to put in front of the value.}
\item{post}{A suffix string to put after the value.}
\item{label}{Display label for the control, or \code{NULL} for no label.}
\item{id}{A unique identifier for this input. Usually generated
automatically.}
\item{map}{A function with single argument \code{x}, the value of the
control on the client. Returns a modified value.}
}
\description{
Create an interactive slider.
}
\examples{
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)
}
\seealso{
Other interactive input:
\code{\link{input_checkbox}()},
\code{\link{input_select}()},
\code{\link{input_text}()}
}
\concept{interactive input}
|