Slimmer loads and support for multi-object I/O
This release adds new functionality, including an import_list() function to retrieve multiple files from a directory or multiple data frames from a multi-object file (e.g., HTML page, .Rdata file, zip directory, etc.). export() to Excel (.xlsx) and HTML also supports multi-object writing via export().
The release also streamlines the set of default packages, so that the package has fewer Imports dependencies, installs faster, and loads faster. install_formats() will install all Suggests packages to enable full file format support.
New features
- New function
import_list()returns a list of data frames from a multi-object Excel Workbook, .Rdata file, zip directory, or HTML file. (#126, #129) import_list()now returns aNULLentry for any failed imports, with a warning. (#149)import_list()gains additional argumentsrbind_fillandrbind_labelto control rbind-ing behavior. (#149)- Added an
rbindargument toimport_list(). (#149) - Added a
setclassargument toimport_list(), ala the same inimport(). export()can now write a list of data frames to an Excel (.xlsx) workbook. (#142, h/t Jeremy Johnson)export()can now write a list of data frames to an HTML (.html) file.- Improved documentation of mapping between file format support and the packages used for each format. (#151, h/t Patrick Kennedy)
- Moved all non-critical format packages to Suggests, rather than Imports. (#143)
- Import to and export from the clipboard now relies on
clipr::read_clip()andclipr::write_clip(), respectively, thus (finally) providing Linux support. (#105, h/t Matthew Lincoln) - Added support for Matlab formats. (#78, #98)
- Added support for fst format. (#138)
- With new data.table release, export using
fwrite()is now the default for text-based file formats. - Handle HTML tables with
<tbody>elements. (h/t Mohamed Elgoussi) - Google Spreadsheets can now be imported using any of the allowed formats (CSV, TSV, XLSX, ODS).
- Added support for writing to ODS files via
readODS::write_ods(). (#96) - Modified defaults and argument handling in internal function
read_delim().
Bug fixes
- Further fixes to .csv.gz import/export. (#146, h/t Trevor Davis)
- Verbosity of
export(format = "fwf")now depends onoptions("verbose"). - Fixed various errors, warnings, and messages in fixed-width format tests.
- Bumped readxl dependency to
>= 0.1.1(#130, h/t Yongfa Chen) - Pass explicit
excel_formatarguments when using readxl functions. (#130) - Fixed a bug in the
.import.rio_xls()and.import.rio_xlsx()where thesheetargument would return an error. - Fixed a bug in the import of delimited files when
fread = FALSE. (#133, h/t Christopher Gandrud) - Fixed a bug in
.import.rio_xls()wherein thewhichargument was ignored. (h/t Mohamed Elgoussi) - Fixed handling of "data.table", "tibble", and "data.frame" classes in
set_class(). (#144)