In R, doing data("foo")
can create an arbitrary number of objects in the workspace. In rpy2
things are contained in an environment. This is making it cleaner.
from rpy2.robjects.packages import importr, data
spep = importr("SpatialEpi")
pennLC_data = data(spep).fetch('pennLC')
pennLC_data
is an Environment
(think of it as a namespace).
To list what was fetched:
pennLC_data.keys()
To get the data object wanted:
pennLC_data['pennLC'] # guessing here, it might be a different name