Wrap numeric vector as flat Java parameter
.jfloat marks a numeric vector as an object that can be used
as parameter to Java calls that require
.jlong marks a numeric vector as
1 2 3 4 5
R has no native
long type. Numeric vectors are
doubles, hence there is no native way to pass float
numbers to Java methods. The
.jfloat call marks a numeric
vector as having the Java type
float by wrapping it in the
jfloat class. The class is still a subclass of
therefore all regular R operations are unaffected by this.
.jlong is used to mark a numeric vector as a
parameter of the
long Java type. Please note that in general R
has no native type that will hold a
long value, so conversion
long type and R's numeric is potentially lossy.
.jbyte is used when a scalar byte is to be passed ot Java. Note
that byte arrays are natively passed as RAW vectors, not as
jchar is strictly experimental and may be based on
character vectors in the future.
Returns a numeric vector of the class
that can be used as parameter to Java calls that require
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.