Open ErickPol opened 4 years ago
It looks like there is an error in our bridge code between Renjin and the LAPACK routine: https://github.com/bedatadriven/renjin/blob/master/core/src/main/java/org/renjin/base/Lapack.java#L829
I believe the working array right
is not being allocated. There's a branch that allocates the array if vectors
is true, but otherwise it remains null.
Perhaps you can compare to the original C code here: https://github.com/wch/r-source/blob/trunk/src/modules/lapack/Lapack.c#L278
and correct the issue?
cmdscale is a function included in the stats package, which is included by default in the R environment (same applies for the base Renjin package). I am able to execute the function cmdscale(matrix, k=1) in Renjin with no issues. However, when using the parameter 'add=TRUE' - as in cmdscale(matrix, k=1, add=TRUE) - Renjin throws an org.renjin.eval.EvalException. Both R and Renjin runs are illustrated below:
Renjin run (release version):
This code runs perfectly well if the option add=TRUE is omitted. However, when it is included the following error is shown:
R run :
The code runs fine and generates the desired output