An R package that simplifies data import and export by automatically selecting the correct function based on file extension.
rio is an R package that provides a simplified interface for importing and exporting data across numerous file formats. It solves the problem of remembering different R functions for different file types by automatically selecting the appropriate method based on file extension. The package supports over 50 formats including CSV, Excel, SPSS, Stata, and compressed archives.
R users who regularly work with multiple data formats, including data scientists, statisticians, and researchers who need efficient data import/export workflows without memorizing format-specific functions.
Developers choose rio because it dramatically simplifies data I/O with just two main functions, reduces code complexity, and supports an extensive range of formats through a consistent interface, making data workflows more reliable and efficient.
🐟 A Swiss-Army Knife for Data I/O
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The import() and export() functions automatically choose the correct method based on file extension, eliminating the need to remember specific functions, as demonstrated in the usage examples with Excel and CSV files.
Handles over 50 file formats including statistical software files like SPSS and Stata, with extended support via optional packages, making it versatile for diverse data sources.
Functions like import_list() and export_list() manage multiple data frames within single files such as Excel workbooks or .Rdata files, simplifying batch operations.
Directly imports from and exports to compressed files like zip and gzip without manual decompression, saving steps in data workflows, as shown with export(mtcars, 'mtcars.tsv.zip').
Many formats require installing additional 'Suggests' packages via install_formats(), increasing setup complexity and potential for missing dependencies in lightweight environments.
rio's unified interface may not expose all advanced options from underlying packages, such as readxl's sheet-specific parameters, limiting fine-tuned control for complex tasks.
Some format support is deprecated, like export for SAS files, and unrecognized formats only yield basic errors, indicating gaps in maintenance or coverage for edge cases.