fastr
fastr copied to clipboard
java interop with R error?
I write a methods on double[][] type in java. when i add this class to R it gives me internal error. what's correspondence R data type to java data type

Hello @ravinder387,
could you please also include the Java code of MatrixSqrt?
public class Array2D {
public double[][] jsqrt(double[][] vec) {
// output
double[][] output = new double[vec.length][vec[0].length];
// iterate col-wise
for (int i = 0; i < vec.length; i++) {
for (int j = 0; j < vec[0].length; j++) {
output[i][j] = Math.sqrt(vec[i][j]);
}
}
// return
return output;
}
}