as_nanoarrow_array_stream | R Documentation |
In nanoarrow, an 'array stream' corresponds to the â struct ArrowArrayStreamâ
as defined in the Arrow C Stream interface. This object is used to represent
a stream of arrays with a common
schema. This is similar to an
arrow::RecordBatchReader except it can be used to represent a stream of
any type (not just record batches). Note that a stream of record batches
and a stream of non-nullable struct arrays are represented identically.
Also note that array streams are mutable objects and are passed by
reference and not by value.
as_nanoarrow_array_stream(x, ..., schema = NULL)
x |
An object to convert to a array_stream |
... |
Passed to S3 methods |
schema |
An optional schema used to enforce conversion to a particular
type. Defaults to |
An object of class 'nanoarrow_array_stream'
(stream <- as_nanoarrow_array_stream(data.frame(x = 1:5)))
stream$get_schema()
stream$get_next()
# The last batch is returned as NULL
stream$get_next()
# Release the stream
stream$release()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.