Examples for 'RJSONIO::asJSVars'


Serialize R objects as Javsscript/ActionScript variables

Aliases: asJSVars

Keywords: IO programming

### ** Examples

 cat(asJSVars( a =  1:10, myMatrix = matrix(1:15, 3, 5)))
a = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ;

myMatrix = [ [ 1, 4, 7, 10, 13 ],
           [ 2, 5, 8, 11, 14 ],
           [ 3, 6, 9, 12, 15 ] ] ;
 cat(asJSVars( a =  1:10, myMatrix = matrix(1:15, 3, 5), types = TRUE))
a : Array = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ;

myMatrix : Array = [ [ 1, 4, 7, 10, 13 ],
                   [ 2, 5, 8, 11, 14 ],
                   [ 3, 6, 9, 12, 15 ] ] ;
 cat(asJSVars( a =  1:10, myMatrix = matrix(1:15, 3, 5),
        qualifier = "protected", types = TRUE))
protected a : Array = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ;

protected myMatrix : Array = [ [ 1, 4, 7, 10, 13 ],
                             [ 2, 5, 8, 11, 14 ],
                             [ 3, 6, 9, 12, 15 ] ] ;

[Package RJSONIO version 1.3-1.6 Index]