Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to export vectors and other data to an R variable?

All the examples I kind find here and in the documentation pass data from sage to R to be used once. I'd like to pass data that's in a sage (python) variable and turn it into an R variable that I can subsequntly use in %r codeblocks.

simple stuff like r.set('x', [1,2,3]) doesn't work because set expects a string. I could turn vectors into strings before passing them to set, but that's kind of klugy (and could be a pain for more complicated things.

how to export vectors vector variables and other data to an structures into R variable?as variables?

All the examples I kind find here and in the documentation pass data from sage to R to be used once. I'd like to pass data that's in a sage (python) variable and turn it into an R variable that I can subsequntly use in %r codeblocks.

simple stuff like r.set('x', [1,2,3]) doesn't work because set expects a string. I could turn vectors into strings before passing them to set, but that's kind of klugy (and could be a pain for more complicated things.