Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
Moves columns between R and the Apache Arrow columnar format: the C data interface in memory and the inter-process communication (IPC) stream and file formats on disk. Every Arrow type converts to an
翻译准备中
开发工具GitHub @pedrobtz在线运营者未确认
试用过了吗? 点一下就好,无需登录。
尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Moves columns between R and the Apache Arrow columnar format: the C data interface in memory and the inter-process communication (IPC) stream and file formats on disk. Every Arrow type converts to an R vector and back, and a conversion either keeps every value unchanged or raises an error that names the column and the R type that would hold it exactly. A registry lets other packages declare which R class is the exact form of which Arrow type. Handles share the layout of the nanoarrow package, so
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗DuckDB, Polars, ADBC drivers, pyarrow and the arrow package all hand
data around as Apache Arrow columns. R has
no exact form for several of Arrow’s types: a 64-bit integer past 2^53,
a decimal128, a nanosecond timestamp. The usual bridges convert them
to a double anyway, and the change goes unnoticed until a join key no
longer matches.
zuarrow moves columns between R and Arrow on one rule: a value crosses exactly, or the call fails, naming the column and the R type that would hold it.
lossy = "error" is the default everywhere. Ask
for the exact text, the nearest R type with a warning, or the nearest
R type silently, but only by asking.arrow_register(), and from then on that column
converts exactly.arrow_read() and arrow_write() handle the
file (.arrow, Feather version 2) and the stream (.arrows), with
LZ4 and zstd bodies decompressed by
zukomp, so a compressed file
opens on every machine.zuarrow is not on CRAN yet. Install the development version from GitHub:
# install.packages("pak")
pak::pak("pedrobtz/zuarrow")
library(zuarrow)
Ordinary columns cross both ways unchanged, factors and dates included.
df <- data.frame(
id = 1:3,
city = factor(c("Lisbon", "Porto", "Lisbon")),
day = as.Date("2026-10-21") + 0:2
)
identical(arrow_to_r(arrow_array(df)), df)
#> [1] TRUE
A 64-bit integer that a double cannot hold is an error, not a rounding.
big <- arrow_array(c("9007199254740993", "1"), schema = "l")
arrow_to_r(big)
#> Error in `arrow_to_r()`:
#> ! Column 1 (Arrow format `l`) can't be converted to R exactly: row 1 holds 9007199254740993. Load zuint to read it exactly, or use `lossy = "character"` for its exact text, or `lossy = "allow"` to accept the loss.
lossy = "character" gives the exact text, which writes back to the
same type.
text <- arrow_to_r(big, lossy = "character")
text
#> [1] "9007199254740993" "1"
#> attr(,"arrow_type")
#> [1] "l"
arrow_equal(arrow_array(text), big)
#> [1] TRUE
The IPC formats are one call each way, with compression on request.
path <- tempfile(fileext = ".arrow")
arrow_write(df, path, compression = "zstd")
arrow_read(path)
#> id city day
#> 1 1 Lisbon 2026-10-21
#> 2 2 Porto 2026-10-22
#> 3 3 Lisbon 2026-10-23
Apart from zuarrow_info(), every function is prefixed arrow_. Each
takes or returns a handle or a plain R object. zuarrow’s own errors
inherit from zuarrow_error, with a class for each kind, such as
zuarrow_lossy_error.
arrow_types() prints the type table.zuarrow bundles the nanoarrow C library and is checked against apache/arrow-testing’s IPC golden files and crash corpus, and against the arrow package.