Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Victory! I knew this should be possible.

In the notebook:

a <- c(1,2,3)

[1] 1 2 3

from sage.interfaces.r import RElement
b = RElement(r,'a')
c = b._sage_()

[1, 2, 3]

and then you can do stuff to c because it's not an RElement.

c[1] = 3

[1, 3, 3]

I don't know whether this is worth wrapping slightly better, or if that is even possible. But hopefully this works for you!