r-py-conversion: Convert between Python and R objects

r-py-conversionR Documentation

Convert between Python and R objects

Description

Convert between Python and R objects

Usage

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

Arguments

x

A 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

Value

An R object, as converted from the Python object.

Author(s)

Luke Zappia

See Also

reticulate::py_to_r() for the base reticulate functions


theislab/zellkonverter documentation built on Oct. 24, 2024, 7:43 a.m.