Learn R Programming

arrow (version 8.0.0)

as_arrow_array: Convert an object to an Arrow Array

Description

The as_arrow_array() function is identical to Array$create() except that it is an S3 generic, which allows methods to be defined in other packages to convert objects to Array. Array$create() is slightly faster because it tries to convert in C++ before falling back on as_arrow_array().

Usage

as_arrow_array(x, ..., type = NULL)

# S3 method for Array as_arrow_array(x, ..., type = NULL)

# S3 method for Scalar as_arrow_array(x, ..., type = NULL)

# S3 method for ChunkedArray as_arrow_array(x, ..., type = NULL)

Arguments

x

An object to convert to an Arrow Array

...

Passed to S3 methods

type

A type for the final Array. A value of NULL will default to the type guessed by infer_type().

Value

An Array with type type.

Examples

Run this code
# NOT RUN {
as_arrow_array(1:5)

# }

Run the code above in your browser using DataLab