rJava (version 0.8-1)

rep: Creates java arrays by cloning

Description

Creates a java array by cloning a reference several times

Arguments

See Also

rep or .jarray

Examples

Run this code
.jinit()
p <- .jnew( "java.awt.Point" )
a <- rep( p, 10 )

stopifnot( dim(a) == c(10L ) )
a[[1]]$move( 10L, 50L )
stopifnot( a[[2]]$getX() == 0.0 )

Run the code above in your browser using DataCamp Workspace