Skip to content

Slimmer loads and support for multi-object I/O

Choose a tag to compare

@leeper leeper released this 28 Apr 12:57

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 a NULL entry for any failed imports, with a warning. (#149)
  • import_list() gains additional arguments rbind_fill and rbind_label to control rbind-ing behavior. (#149)
  • Added an rbind argument to import_list(). (#149)
  • Added a setclass argument to import_list(), ala the same in import().
  • 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() and clipr::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 on options("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_format arguments when using readxl functions. (#130)
  • Fixed a bug in the .import.rio_xls() and .import.rio_xlsx() where the sheet argument 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 the which argument was ignored. (h/t Mohamed Elgoussi)
  • Fixed handling of "data.table", "tibble", and "data.frame" classes in set_class(). (#144)