r-py-conversion | R Documentation |
Convert between Python and R objects
## S3 method for class 'numpy.ndarray'
py_to_r(x)
x |
A Python object. |
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
An R object, as converted from the Python object.
Luke Zappia
reticulate::py_to_r()
for the base reticulate
functions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.