Data Import and Export
Last updated: January 18, 2021
rio package provides a simple interface for importing and exporting data through common
export() functions. File type is inferred from the file name extension.
Writing CSV files
For large datasets, use
data.table. It is much faster than
Serialization is reading/writing data frames from a file, while maintaining metadata like column type. It is similar to using
.csv as an export format, but this doesn’t maintain metadata and can be much slower.
ℹ️ This page is part of my knowledge base for R, the popular statistical programming language. I attempt to use idiomatic practices with the
tidyverse collection of packages as much as possible. If you have suggestions for ways to improve this code, please contact me or use the survey link below..