Description Usage Arguments Value Examples
Manipulate command ala RStudio
1 | manipulate(._expr, ...)
|
._expr |
expression to produce output. |
... |
used to specify controls. See These controls may also be specified through a object,
from which the control is guessed. A logical maps to
|
makes output, returns Manipulate object
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 | ## Not run:
## from RStudio::manipulate
manipulate(## expression
plot(cars, xlim = c(x.min, x.max), type = type,
axes = axes, ann = label),
## controls
x.min = slider(0,15),
x.max = slider(15,30, initial = 25),
type = picker("p", "l", "b", "c", "o", "h", "s"),
axes = checkbox(TRUE, label="Draw Axes"),
label = checkbox(FALSE, label="Draw Labels")
)
## using shortcuts, ala Mathematica's manipulate
manipulate(## expression
plot(cars, xlim = c(x.min, x.max), type = type,
axes = axes, ann = label),
## controls
x.min = 0:15,
x.max = c(15,30, 1, 25), ## min, max, step=min, initial=min
type = c("p", "l", "b", "c", "o", "h", "s"),
axes = TRUE,
label = FALSE
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.