在使用arrow表时,可以使用tidyr包中的separate函数来分离一个列中的字符。示例如下:
library(arrow)
library(tidyr)
# 读取arrow表
data <- arrow::read_feather("path/to/arrow/file")
# 分离列名为"column_name"的列
data <- separate(data, column_name, into = c("new_col1", "new_col2"), sep = "_")
此代码中,read_feather()函数用于读取arrow表,separate()函数用于将名为"column_name"的列分离为两个新列,新列的名称分别为"new_col1"和"new_col2",分隔符为"_"。