R language to split a CSV file

Open the csv file (temp) that needs to be split, split and write to the flights folder, each file has 9999+1 lines:

library(arrow)
ds=open_dataset("temp.csv",format="csv")
write_dataset(ds,"flights",format="csv",max_rows_per_file=9999)

The result is shown in the figure:

Guess you like

Origin blog.csdn.net/weixin_45709013/article/details/132302180