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().
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)An object to convert to an Arrow Array
Passed to S3 methods
A type for the final Array. A value of NULL
will default to the type guessed by infer_type().
An Array with type type.
as_arrow_array(1:5)
#> Array
#> <int32>
#> [
#>   1,
#>   2,
#>   3,
#>   4,
#>   5
#> ]