Bring the presumed limitations on.
Rpy2
is, at its lower level (the rpy2.rinterface
level), exposing a very large part of the R C-API. Technically, one can do more with rpy2
than one can from R itself (writing C extension for R would possibly be the only way to catch up). As an amusing fact,doing "R stuff" from rpy2
can be faster than doing the same from R itself (see the rpy2
documentation benchmarking the access of elements in an R vector).
The higher level in rpy2
(rpy2.robject
level) is adding a layer that makes "doing R stuff" more "pythonic" (although by surrendering the performance claim mentioned above). R packages look like Python modules, has classes such as Formula, Factor, etc... to have all R objects as Python classes, has a conversion system to let one complex R structures can be mapped to Python objects automagically (see example with lme4
in the rpy2
documentation0, translates on the fly invalid R variable names ('.' is a valid character for variable names in R), create on the fly Python docstrings from R documentation.