Description Usage Arguments Details Value Author(s) See Also
View source: R/rglcontroller.R
These are setter functions to produce actions in a Shiny app, or in an animation.
1 2 3 4 5 | subsetControl(value = 1, subsets, subscenes = NULL,
fullset = Reduce(union, subsets),
accumulate = FALSE)
propertyControl(value = 0, entries, properties, objids, values = NULL,
param = seq_len(NROW(values)) - 1, interp = TRUE)
|
value |
The value to use for input (typically |
subsets |
A list of vectors of object identifiers; the value will choose among them. |
fullset |
Objects in the subscene which are not in |
subscenes |
The subscenes to be controlled. If |
accumulate |
If |
entries, properties, objids |
Which properties to set. |
values |
Values to set. |
param |
Parameter values corresponding to the rows of |
interp |
Whether to use linear interpolation between |
subsetControl
produces data for playwidget
to
display subsets of the object in one or more subscenes. This code will not
touch objects in the
subscenes if they
are not in fullset
. fullset
defaults to the union of
all the object ids mentioned in subsets
, so by default if an id is
not mentioned in one of the subsets, it will not be controlled by the slider. If value
is specified in R code, it will be a 1-based
index into the subsets
list; when specified internally
in Javascript, 0-based indexing into the corresponding array
will be used.
propertyControl
sets individual properties. Here the row
of values
is determined by the position of value
in param
.
These functions return controller data in a list of class
"rglControl"
.
Duncan Murdoch
subsetSetter
for a way to embed a pure Javascript
control, and playwidget
for a way to use these
in animations (including Shiny), rglShared
for linking using the crosstalk package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.