Georg Heiler Georg Heiler - 1 month ago 19
Python Question

jupyter R magics to python script

How can I convert the jupyter R magics like

%%R
or
%Rpush
or
%Rpull
or the execution of an R function into a regular python script?

Answer

The answer is partly in the comments above: http://rpy2.readthedocs.io/en/version_2.8.x/introduction.html#creating-rpy2-vectors here is a nice and longer explanation This is the solution to the last mentioned problem of implementing a %Rpush robjects.IntVector([1, 2, 3])