Gory details¶
wrapper¶
- class biorpy.betteR.BetteR(converter=<function convertToR at 0x1099310c8>)[source]¶
Wrapper for rpy2.robjects.R
- __init__(converter=<function convertToR at 0x1099310c8>)[source]¶
Initialize the RPy2 wrapper instance
- addHandler_(handler)[source]¶
Add a biorpy.betteR.Handler.
- class biorpy.betteR.Handler(rname, pyname=None, defaults=None, converter=<function convertToR at 0x1099310c8>)[source]¶
Wrapper for R objects to implement:
- default arguments
- argument conversion
- output conversion
- __init__(rname, pyname=None, defaults=None, converter=<function convertToR at 0x1099310c8>)[source]¶
Parameters: - name – name of the R function
- defaults – a dictionary of default arguments to the function
- outputs – a dictionary whose values are lists of functions used to extract values from the return R value. For example: {“p.value”:[rx(“p.value”), item(0), item(0)]}
- converter – a conversion function used to convert python objects into R objects
conversion¶
- class biorpy.conversion.ResultWrapper(result)[source]¶
Represents output from R as a dictionary-like object, with conversion of each value to a pandas DataFrame or a numpy.array if possible
Attributes that contain a period in R can usually be accessed directly from python by omitting the period (eg, ‘p.value’ can be accessed from ‘pvalue’)