4 Creating Arrow Objects
4.1 Create an Arrow Array from an R object
You want to convert an existing vector in R to an Arrow Array object.
4.2 Create a Arrow Table from an R object
You want to convert an existing data frame in R to an Arrow Table object.
4.3 View the contents of an Arrow Table or RecordBatch
You want to view the contents of an Arrow Table or RecordBatch.
4.4 Manually create a RecordBatch from an R object.
You want to convert an existing data frame in R to an Arrow RecordBatch object.
4.4.1 Solution
# Create an example data frame
my_tibble <- tibble::tibble(group = c("A", "B", "C"), score = c(99, 97, 99))
# Convert to Arrow RecordBatch
my_record_batch <- record_batch(my_tibble)
# View RecordBatch
my_record_batch
## RecordBatch
## 3 rows x 2 columns
## $group <string>
## $score <double>