Description Usage Arguments Value See Also Examples
These functions allow the storage of custom state variables across multiple evaluations of manipulator expressions. These functions are useful if the manipulate expression is a custom function (rather than a high level plotting function like plot
) which requires reading and writing of persistent values.
1 2 | manipulatorSetState(name, value)
manipulatorGetState(name)
|
name |
A chraracter string holding a state variable name. |
value |
An object holding a state value. |
manipulatorGetState
returns a custom state value which was previously set by manipulatorSetState
(or NULL
if the specified name is not found).
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
## set custom state variable
manipulatorSetState("last", x)
## get custom state variable
last <- manipulatorGetState("last")
if ( !is.null(last) ) {
# do something interesting
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.