Convert between Python and R objects

# S3 method for class 'numpy.ndarray'
py_to_r(x)

Arguments

x

A Python object.

Value

An R object, as converted from the Python object.

Details

These functions are extensions of the default conversion functions in the reticulate package for the following reasons:

  • numpy.ndarray - Handle conversion of numpy recarrays

  • pandas.core.arrays.masked.BaseMaskedArray - Handle conversion of pandas arrays (used when by AnnData objects when there are missing values)

  • pandas.core.arrays.categorical.Categorical - Handle conversion of pandas categorical arrays

See also

reticulate::py_to_r() for the base reticulate functions

Author

Luke Zappia