Description Usage Arguments Value See Also Examples
Create a slider control to allow manipulation of a plot variable along a numeric range.
1 2 |
min |
Minimum value for slider. |
max |
Maximum value for slider. |
initial |
Initial value for slider. Defaults to |
label |
Display label for slider. Defaults to the variable name if not specified. |
step |
Step value for slider. If not specified then defaults to 1 for integer ranges and single pixel granularity for floating point ranges ( |
ticks |
Show tick marks on the slider. Note that if the granularity of the step value is very low (more than 25 ticks would be shown) then ticks are automatically turned off. |
An object of class "manipulator.slider" which can be passed to the manipulate
function.
manipulate
, picker
, checkbox
, button
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 | ## Not run:
## Create a plot with a slider
manipulate(plot(1:x), x = slider(5, 10))
## Use multiple sliders
manipulate(
plot(cars, xlim = c(x.min, x.max)),
x.min = slider(0,15),
x.max = slider(15,30))
## Specify a custom initial value for a slider
manipulate(
barplot(1:x),
x = slider(5, 25, initial = 10))
## Specify a custom label for a slider
manipulate(
barplot(1:x),
x = slider(5, 25, label = "Limit"))
## Specify a step value for a slider
manipulate(
barplot(1:x),
x = slider(5, 25, step = 5))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.