rep: Creates java arrays by cloning

Description Methods See Also Examples

Description

Creates a java array by cloning a reference several times

Methods

rep

signature(object = "jobjRef"): ...

rep

signature(object = "jarrayRef"): ...

rep

signature(object = "jrectRef"): ...

See Also

rep or .jarray

Examples

1
2
3
4
5
6
7
8
if (!nzchar(Sys.getenv("NOAWT"))) {
  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 )
}

rJava documentation built on Dec. 11, 2021, 9:25 a.m.

Related to rep in rJava...