asJSVars | R Documentation |
This function takes R objects and serializes them as Javascript/ActionScript values. It uses the specified names in the R call as Javascript variable names. One can also specify qualifiers (‘public’, ‘protected’, ‘private’) and also types. These are optional, but useful, in ActionScript.
asJSVars(..., .vars = list(...), qualifier = character(), types = character())
... |
|
.vars |
this is an alternative to ... as a way to specify a collection of
|
qualifier |
a character vector (recycled as necessary) which is used as qualifiers for the individual ActionScript variables. The values should be public, protected or private. |
types |
either a logical value or a character vector (which is
recycled if necessary). If this is |
A character vector of length 1 giving the variable declarations and initializations.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
toJSON
cat(asJSVars( a = 1:10, myMatrix = matrix(1:15, 3, 5)))
cat(asJSVars( a = 1:10, myMatrix = matrix(1:15, 3, 5), types = TRUE))
cat(asJSVars( a = 1:10, myMatrix = matrix(1:15, 3, 5),
qualifier = "protected", types = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.