4 创建 Arrow 对象
4.4 手動使用 R 物件建立 RecordBatch。
您想要將 R 中現有的資料框轉成 Arrow RecordBatch 物件。
4.4.1 解決方案
# Create an example data frame
<- tibble::tibble(group = c("A", "B", "C"), score = c(99, 97, 99))
my_tibble # Convert to Arrow RecordBatch
<- record_batch(my_tibble)
my_record_batch # View RecordBatch
my_record_batch
## RecordBatch
## 3 rows x 2 columns
## $group <string>
## $score <double>