Module arrow_extendr::to
source · Expand description
Convert arrow-rs structs into an Robj
The traits ToArrowRobj
and IntoArrowRobj
provide the methods
to_arrow_robj()
and into_arrow_robj()
respectively. The former
takes a reference to self whereas the latter consumes self.
Prefer to_arrow_robj()
for all structs except ArrowArrayStreamReader
.
ⓘ
fn array_to_robj() -> Result<Robj> {
let array = Int32Array::from(vec![Some(1), None, Some(3)]);
array.to_arrow_robj()
}
arrow-rs struct | R object |
---|---|
ArrayData | nanoarrow_array |
PrimitiveArray<T> | nanoarrow_array |
Field | nanoarrow_schema |
DataType | nanoarrow_schema |
Schema | nanoarrow_schema |
RecordBatch | nanoarrow_array_stream |
ArrowArrayStreamReader | nanoarrow_array_stream |
Traits
- Convert an Arrow struct to an
Robj
- Convert an Arrow struct to an
Robj
Functions
- Calls
nanoarrow::nanoarrow_allocate_array()
- Calls
nanoarrow::nanoarrow_allocate_array_stream()
- Calls
nanoarrow::nanoarrow_allocate_schema()
- Calls
nanoarrow::nanoarrow_pointer_move()
- Calls
nanoarrow::nanoarrow_array_set_schema()