Sharedthe-R-interpreter-using-r.sagewsOpen in CoCalc
Author: Samuel Lelièvre
Description: Illustrate CoCalc bug report at https://ask.sagemath.org/question/40017 and https://github.com/sagemathinc/cocalc/issues/2564
# Illustrate the bug reported on Ask Sage: # # https://ask.sagemath.org/question/40017/rxyz-isnt-working-anymore-r-project/ # # This bug is reported on CoCalc's issue tracker on GitHub: # # https://github.com/sagemathinc/cocalc/issues/2564 #
x = r([10.4, 5.6, 3.1, 6.4, 21.7]); x
Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2168, in r return r.jupyter_kernel(code,**kwargs) File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_jupyter.py", line 179, in run_code msg_id = kc.execute(code) File "/ext/sage/sage-8.0/local/lib/python2.7/site-packages/jupyter_client/client.py", line 244, in execute raise ValueError('code %r must be a string' % code) ValueError: code [10.4000000000000, 5.60000000000000, 3.10000000000000, 6.40000000000000, 21.7000000000000] must be a string
r = R() x = r([10.4, 5.6, 3.1, 6.4, 21.7]); x
[1] 10.4 5.6 3.1 6.4 21.7