powered by
Whereas record_batch() constructs a RecordBatch from one or more columns, as_record_batch() converts a single object to an Arrow RecordBatch.
record_batch()
as_record_batch()
as_record_batch(x, ..., schema = NULL)# S3 method for RecordBatch as_record_batch(x, ..., schema = NULL)# S3 method for Table as_record_batch(x, ..., schema = NULL)# S3 method for data.frame as_record_batch(x, ..., schema = NULL)
# S3 method for RecordBatch as_record_batch(x, ..., schema = NULL)
# S3 method for Table as_record_batch(x, ..., schema = NULL)
# S3 method for data.frame as_record_batch(x, ..., schema = NULL)
An object to convert to an Arrow RecordBatch
Passed to S3 methods
a Schema, or NULL (the default) to infer the schema from the data in .... When providing an Arrow IPC buffer, schema is required.
NULL
...
schema
A RecordBatch
# NOT RUN { # use as_record_batch() for a single object as_record_batch(data.frame(col1 = 1, col2 = "two")) # use record_batch() to create from columns record_batch(col1 = 1, col2 = "two") # }
Run the code above in your browser using DataLab