This high‑level wrapper writes an aniframe object to a file in one of the
supported formats (parquet, csv, or tsv). We highly recommend using parquet
as neither csv or tsv can preserve the metadata.
Arguments
- data
An aniframe object (see
aniframe::is_aniframe()).- filename
Character string specifying the output file name. The file extension determines which writer is used.
- ...
Additional arguments passed to the format‑specific writer (
write_aniframe_csv()orwrite_aniframe_parquet()). Typical arguments includedelim,col_names,compression, etc., depending on the backend.
Details
Supported extensions are
"parquet","csv"and"tsv". We highly recommend usingparquetas neithercsvortsvcan preserve the metadata.CSV/TSV files are written with the vroom for fast I/O.
Parquet files are written with the arrow package is installed (install‑on‑demand if missing).
Examples
if (FALSE) { # \dontrun{
## Create a small aniframe for demonstration
df <- aniframe::example_aniframe()
## Write the aniframe as CSV
write_aniframe(df, "demo.csv")
## Write the same aniframe as Parquet
write_aniframe(df, "demo.parquet")
} # }