Module arrow_extendr::from

source ·
Expand description

Convert arrow-rs objects to an Robj

fn array_from_r(field: Robj) -> Result<ArrayData> {
    ArrayData::from_arrow_robj(&field)?
}

Robjs from {nanoarrow} and {arrow} are both supported.

arrow-rs structR object
Fieldnanoarrow_schema or arrow::Field
Schemananoarrow_schema or arrow::Schema
DataTypenanoarrow_schema or arrow::DataType
ArrayDatananoarrow_array or arrow::Array
RecordBatchnanoarrow_array_stream or arrow::RecordBatch
ArrowArrayStreamReadernanoarrow_array_stream

Notes

In the case of creating a RecordBatch from a nanoarrow_array_stream only the first chunk is returned. If you expect more than one chunk, use ArrowArrayStreamReader.

Traits

Functions

Type Definitions