jfloat: Wrap numeric vector as flat Java parameter
Description
.jfloat marks a numberic vector as an object that can be used as parameter to Java calls that require float parameters.Value
- Returns a numeric vector fo the class
jfloat that can be used as parameter to Java calls that require float parameters.
Details
R has no native float type. Numeric vectors are stored as 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 numeric, therefore all regular R operations are unaffected by this.