Whereas arrow_table()
constructs a table from one or more columns,
as_arrow_table()
converts a single object to an Arrow Table.
as_arrow_table(x, ..., schema = NULL)# S3 method for default
as_arrow_table(x, ...)
# S3 method for Table
as_arrow_table(x, ..., schema = NULL)
# S3 method for RecordBatch
as_arrow_table(x, ..., schema = NULL)
# S3 method for data.frame
as_arrow_table(x, ..., schema = NULL)
An object to convert to an Arrow Table
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.
A Table
# NOT RUN {
# use as_arrow_table() for a single object
as_arrow_table(data.frame(col1 = 1, col2 = "two"))
# use arrow_table() to create from columns
arrow_table(col1 = 1, col2 = "two")
# }
Run the code above in your browser using DataLab