fst(https://www.fstpackage.org/)提供了一种快速、简单和灵活的方法来序列化数据帧。其读写文件的速度更快

基本用法

# Generate some random data frame with 10 million rows and various column types
nr_of_rows <- 1e7

df <- data.frame(
    Logical = sample(c(TRUE, FALSE, NA), prob = c(0.85, 0.1, 0.05), nr_of_rows, replace = TRUE),
    Integer = sample(1L:100L, nr_of_rows, replace = TRUE),
    Real = sample(sample(1:10000, 20) / 100, nr_of_rows, replace = TRUE),
    Factor = as.factor(sample(labels(UScitiesD), nr_of_rows, replace = TRUE))
  )

# Store the data frame to disk
  write.fst(df, "dataset.fst")
  
# Retrieve the data frame again
  df <- read.fst("dataset.fst")

Apache Arrow是一个用于内存数据的跨语言开发平台。它为平面和分层数据指定了一种标准化的独立于语言的列式内存格式,组织起来用于在现代硬件上进行高效的分析操作。它还提供计算库和零拷贝流式消息传递和进程间通信。arrow包公开了一个 Arrow C++ 库的接口,可以访问它在 R 中的许多功能。它提供了对 Arrow C++ 库 API 的低级访问,

基本用法则是:

  1. 高性能读写
  2. 结合dplyr 操作数据