CommunityData:Exporting from Python to R

From CommunityData
Revision as of 21:33, 25 August 2016 by Benjamin Mako Hill (talk | contribs) (Created page with "I run a cell like this at the top: # import code to write r modules and create our variable we'll write to import rpy2.robjects as robjects from rpy2.robjects import panda...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I run a cell like this at the top:

# import code to write r modules and create our variable we'll write to
import rpy2.robjects as robjects
from rpy2.robjects import pandas2ri
pandas2ri.activate()
r = {}
def remember(name, x):
    r[name] = x
    display(x)