[graalvm-users] print.default not being called?
Rodrigo Botafogo
rodrigo.a.botafogo at gmail.com
Wed Jun 20 09:54:22 PDT 2018
Hello,
The following code works fine:
R.eval(<<-R)
vec = c(1, 2, 3, 4);
print(vec);
R
and prints: [1] 1 2 3 4
Now doing:
pp = R.eval("print")
pp.call(Polyglot.eval("R", "c(1, 2, 3, 4)"))
give the following error:
Failure/Error: pp.call(Polyglot.eval("R", "c(1, 2, 3, 4)"))
RuntimeError:
Error in UseMethod("print") :
no applicable method for 'print' applied to an object of class
'[double, numeric]' (RError)
but doing:
pp = R.eval("print.default")
pp.call(Polyglot.eval("R", "c(1, 2, 3, 4)")
works fine.
Seems like ‘print’ when called from Interop does not call ‘print.default’.
Is this a bug?
--
Rodrigo Botafogo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-users/attachments/20180620/3ef426b6/attachment.html
More information about the GraalVM-Users
mailing list