Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rio
Type: Package
Title: A Swiss-Army Knife for Data I/O
Version: 1.2.4
Version: 1.2.5
Authors@R: c(person("Jason", "Becker", role = "aut", email = "jason@jbecker.co"),
person("Chung-hong", "Chan", role = c("aut", "cre"), email = "chainsawtiney@gmail.com",
comment = c(ORCID = "0000-0002-6232-7530")),
Expand Down Expand Up @@ -52,7 +52,7 @@ Imports:
tibble,
writexl,
lifecycle,
R.utils,
R.utils (>= 2.13.0),
readr
Suggests:
datasets,
Expand All @@ -70,7 +70,6 @@ Suggests:
rmatio,
xml2 (>= 1.2.0),
yaml,
qs,
arrow (>= 0.17.0),
stringi,
withr,
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ S3method(.export,rio_ods)
S3method(.export,rio_parquet)
S3method(.export,rio_psv)
S3method(.export,rio_pzfx)
S3method(.export,rio_qs)
S3method(.export,rio_qs2)
S3method(.export,rio_r)
S3method(.export,rio_rda)
Expand Down Expand Up @@ -58,7 +57,6 @@ S3method(.import,rio_ods)
S3method(.import,rio_parquet)
S3method(.import,rio_psv)
S3method(.import,rio_pzfx)
S3method(.import,rio_qs)
S3method(.import,rio_qs2)
S3method(.import,rio_r)
S3method(.import,rio_rda)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# rio 1.2.5

* Fix #473, remove support for `qs`

# rio 1.2.4

* Fix #463, export_list also allows ods and fods
Expand Down
5 changes: 1 addition & 4 deletions R/export.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
#' \item R syntax object (.R), using [base::dput()] (by default) or [base::dump()] (if `format = 'dump'`)
#' \item Saved R objects (.RData,.rda), using [base::save()]. In this case, `x` can be a data frame, a named list of objects, an R environment, or a character vector containing the names of objects if a corresponding `envir` argument is specified.
#' \item Serialized R objects (.rds), using [base::saveRDS()]. In this case, `x` can be any serializable R object.
#' \item Serialized R objects (.qs), using [qs::qsave()], which is
#' significantly faster than .rds. This can be any R
#' object (not just a data frame).
#' \item Serialized R objects (.qs2), using [qs2::qs_save()]. This is the future-proof successor to using (.qs).
#' \item Serialized R objects (.qs2), using [qs2::qs_save()].
#' \item "XBASE" database files (.dbf), using [foreign::write.dbf()]
#' \item Weka Attribute-Relation File Format (.arff), using [foreign::write.arff()]
#' \item Fixed-width format data (.fwf), using [utils::write.table()] with `row.names = FALSE`, `quote = FALSE`, and `col.names = FALSE`
Expand Down
6 changes: 0 additions & 6 deletions R/export_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,6 @@ export_delim <- function(file, x, fwrite = lifecycle::deprecated(), sep = "\t",
.docall(nanoparquet::write_parquet, ..., args = list(x = x, file = file))
}

#' @export
.export.rio_qs <- function(file, x, ...) {
.check_pkg_availability("qs")
.docall(qs::qsave, ..., args = list(x = x, file = file))
}

#' @export
.export.rio_qs2 <- function(file, x, ...) {
.check_pkg_availability("qs2")
Expand Down
5 changes: 1 addition & 4 deletions R/import.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
#' \item R syntax object (.R), using [base::dget()], see `trust` below.
#' \item Saved R objects (.RData,.rda), using [base::load()] for single-object .Rdata files. Use `which` to specify an object name for multi-object .Rdata files. This can be any R object (not just a data frame), see `trust` below.
#' \item Serialized R objects (.rds), using [base::readRDS()]. This can be any R object (not just a data frame), see `trust` below.
#' \item Serialized R objects (.qs), using [qs::qread()], which is
#' significantly faster than .rds. This can be any R
#' object (not just a data frame).
#' \item Serialized R objects (.qs2), using [qs2::qs_read()]. This is the future-proof successor to using (.qs).
#' \item Serialized R objects (.qs2), using [qs2::qs_read()].
#' \item Epiinfo (.rec), using [foreign::read.epiinfo()]
#' \item Minitab (.mtp), using [foreign::read.mtp()]
#' \item Systat (.syd), using [foreign::read.systat()]
Expand Down
6 changes: 0 additions & 6 deletions R/import_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,6 @@ extract_html_row <- function(x, empty_value) {
.docall(nanoparquet::read_parquet, ..., args = list(file = file, options = nanoparquet::parquet_options(class = "data.frame")))
}

#' @export
.import.rio_qs <- function(file, which = 1, ...) {
.check_pkg_availability("qs")
.docall(qs::qread, ..., args = list(file = file))
}

#' @export
.import.rio_qs2 <- function(file, which = 1, ...) {
.check_pkg_availability("qs2")
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
140 changes: 70 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ coverage](https://codecov.io/gh/gesistsa/rio/graph/badge.svg)](https://app.codec
The aim of **rio** is to make data file I/O in R as easy as possible by
implementing two main functions in Swiss-army knife style:

- `import()` provides a painless data import experience by automatically
choosing the appropriate import/read function based on file extension
(or a specified `format` argument)
- `export()` provides the same painless file recognition for data
export/write functionality
- `import()` provides a painless data import experience by
automatically choosing the appropriate import/read function based on
file extension (or a specified `format` argument)
- `export()` provides the same painless file recognition for data
export/write functionality

## Installation

Expand Down Expand Up @@ -135,55 +135,54 @@ install_formats()

The full list of supported formats is below:

| Name | Extensions / “format” | Import Package | Export Package | Type | Note |
|:---|:---|:---|:---|:---|:---|
| Archive files (handled by tar) | tar / tar.gz / tgz / tar.bz2 / tbz2 | utils | utils | Default | |
| Bzip2 | bz2 / bzip2 | base | base | Default | |
| Gzip | gz / gzip | base | base | Default | |
| Zip files | zip | utils | utils | Default | |
| Ambiguous file format | dat | data.table | | Default | Attempt as delimited text data |
| CSVY (CSV + YAML metadata header) | csvy | data.table | data.table | Default | |
| Comma-separated data | csv | data.table | data.table | Default | |
| Comma-separated data (European) | csv2 | data.table | data.table | Default | |
| Data Interchange Format | dif | utils | | Default | |
| Epiinfo | epiinfo / rec | foreign | | Default | |
| Excel | excel / xlsx | readxl | writexl | Default | |
| Excel (Legacy) | xls | readxl | | Default | |
| Excel (Read only) | xlsm / xltx / xltm | readxl | | Default | |
| Fixed-width format data | fwf | readr | utils | Default | |
| Fortran data | fortran | utils | | Default | No recognized extension |
| Google Sheets | googlesheets | data.table | | Default | As comma-separated data |
| Minitab | minitab / mtp | foreign | | Default | |
| Pipe-separated data | psv | data.table | data.table | Default | |
| R syntax | r | base | base | Default | |
| SAS | sas / sas7bdat | haven | haven | Default | Export is deprecated |
| SAS XPORT | xport / xpt | haven | haven | Default | |
| SPSS | sav / spss | haven | haven | Default | |
| SPSS (compressed) | zsav | haven | haven | Default | |
| SPSS Portable | por | haven | | Default | |
| Saved R objects | rda / rdata | base | base | Default | |
| Serialized R objects | rds | base | base | Default | |
| Stata | dta / stata | haven | haven | Default | |
| Systat | syd / systat | foreign | | Default | |
| Tab-separated data | / tsv / txt | data.table | data.table | Default | |
| Text Representations of R Objects | dump | base | base | Default | |
| Weka Attribute-Relation File Format | arff / weka | foreign | foreign | Default | |
| XBASE database files | dbf | foreign | foreign | Default | |
| Apache Arrow (Parquet) | parquet | nanoparquet | nanoparquet | Suggest | |
| Clipboard | clipboard | clipr | clipr | Suggest | default is tsv |
| EViews | eviews / wf1 | hexView | | Suggest | |
| Fast Storage | fst | fst | fst | Suggest | |
| Feather R/Python interchange format | feather | arrow | arrow | Suggest | |
| Graphpad Prism | pzfx | pzfx | pzfx | Suggest | |
| HTML Tables | htm / html | xml2 | xml2 | Suggest | |
| JSON | json | jsonlite | jsonlite | Suggest | |
| Matlab | mat / matlab | rmatio | rmatio | Suggest | |
| OpenDocument Spreadsheet | ods | readODS | readODS | Suggest | |
| OpenDocument Spreadsheet (Flat) | fods | readODS | readODS | Suggest | |
| Serialized R objects (qs) | qs | qs | qs | Suggest | |
| Serialized R objects (qs2) | qs2 | qs2 | qs2 | Suggest | Replaces {qs} package which will be deprecated. |
| Shallow XML documents | xml | xml2 | xml2 | Suggest | |
| YAML | yaml / yml | yaml | yaml | Suggest | |
| Name | Extensions / “format” | Import Package | Export Package | Type | Note |
| :---------------------------------- | :---------------------------------- | :------------- | :------------- | :------ | :----------------------------- |
| Archive files (handled by tar) | tar / tar.gz / tgz / tar.bz2 / tbz2 | utils | utils | Default | |
| Bzip2 | bz2 / bzip2 | base | base | Default | |
| Gzip | gz / gzip | base | base | Default | |
| Zip files | zip | utils | utils | Default | |
| Ambiguous file format | dat | data.table | | Default | Attempt as delimited text data |
| CSVY (CSV + YAML metadata header) | csvy | data.table | data.table | Default | |
| Comma-separated data | csv | data.table | data.table | Default | |
| Comma-separated data (European) | csv2 | data.table | data.table | Default | |
| Data Interchange Format | dif | utils | | Default | |
| Epiinfo | epiinfo / rec | foreign | | Default | |
| Excel | excel / xlsx | readxl | writexl | Default | |
| Excel (Legacy) | xls | readxl | | Default | |
| Excel (Read only) | xlsm / xltx / xltm | readxl | | Default | |
| Fixed-width format data | fwf | readr | utils | Default | |
| Fortran data | fortran | utils | | Default | No recognized extension |
| Google Sheets | googlesheets | data.table | | Default | As comma-separated data |
| Minitab | minitab / mtp | foreign | | Default | |
| Pipe-separated data | psv | data.table | data.table | Default | |
| R syntax | r | base | base | Default | |
| SAS | sas / sas7bdat | haven | haven | Default | Export is deprecated |
| SAS XPORT | xport / xpt | haven | haven | Default | |
| SPSS | sav / spss | haven | haven | Default | |
| SPSS (compressed) | zsav | haven | haven | Default | |
| SPSS Portable | por | haven | | Default | |
| Saved R objects | rda / rdata | base | base | Default | |
| Serialized R objects | rds | base | base | Default | |
| Stata | dta / stata | haven | haven | Default | |
| Systat | syd / systat | foreign | | Default | |
| Tab-separated data | / tsv / txt | data.table | data.table | Default | |
| Text Representations of R Objects | dump | base | base | Default | |
| Weka Attribute-Relation File Format | arff / weka | foreign | foreign | Default | |
| XBASE database files | dbf | foreign | foreign | Default | |
| Apache Arrow (Parquet) | parquet | nanoparquet | nanoparquet | Suggest | |
| Clipboard | clipboard | clipr | clipr | Suggest | default is tsv |
| EViews | eviews / wf1 | hexView | | Suggest | |
| Fast Storage | fst | fst | fst | Suggest | |
| Feather R/Python interchange format | feather | arrow | arrow | Suggest | |
| Graphpad Prism | pzfx | pzfx | pzfx | Suggest | |
| HTML Tables | htm / html | xml2 | xml2 | Suggest | |
| JSON | json | jsonlite | jsonlite | Suggest | |
| Matlab | mat / matlab | rmatio | rmatio | Suggest | |
| OpenDocument Spreadsheet | ods | readODS | readODS | Suggest | |
| OpenDocument Spreadsheet (Flat) | fods | readODS | readODS | Suggest | |
| Serialized R objects (qs2) | qs2 | qs2 | qs2 | Suggest | |
| Shallow XML documents | xml | xml2 | xml2 | Suggest | |
| YAML | yaml / yml | yaml | yaml | Suggest | |

Additionally, any format that is not supported by **rio** but that has a
known R implementation will produce an informative error message
Expand Down Expand Up @@ -254,22 +253,23 @@ c("mtcars.tsv", "iris.tsv") %in% dir()

### GUIs

- [**datamods**](https://cran.r-project.org/package=datamods) provides
Shiny modules for importing data via `rio`.
- [**rioweb**](https://github.com/lbraglia/rioweb) that provides access
to the file conversion features of `rio`.
- [**GREA**](https://github.com/Stan125/GREA/) is an RStudio add-in that
provides an interactive interface for reading in data using `rio`.
- [**datamods**](https://cran.r-project.org/package=datamods) provides
Shiny modules for importing data via `rio`.
- [**rioweb**](https://github.com/lbraglia/rioweb) that provides
access to the file conversion features of `rio`.
- [**GREA**](https://github.com/Stan125/GREA/) is an RStudio add-in
that provides an interactive interface for reading in data using
`rio`.

### Similar packages

- [**reader**](https://cran.r-project.org/package=reader) handles
certain text formats and R binary files
- [**io**](https://cran.r-project.org/package=io) offers a set of custom
formats
- [**ImportExport**](https://cran.r-project.org/package=ImportExport)
focuses on select binary formats (Excel, SPSS, and Access files) and
provides a Shiny interface.
- [**SchemaOnRead**](https://cran.r-project.org/package=SchemaOnRead)
iterates through a large number of possible import methods until one
works successfully
- [**reader**](https://cran.r-project.org/package=reader) handles
certain text formats and R binary files
- [**io**](https://cran.r-project.org/package=io) offers a set of
custom formats
- [**ImportExport**](https://cran.r-project.org/package=ImportExport)
focuses on select binary formats (Excel, SPSS, and Access files) and
provides a Shiny interface.
- [**SchemaOnRead**](https://cran.r-project.org/package=SchemaOnRead)
iterates through a large number of possible import methods until one
works successfully
4 changes: 2 additions & 2 deletions data-raw/single.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
{
"input": "qs",
"format": "qs",
"type": "suggest",
"type": "known",
"format_name": "Serialized R objects (qs)",
"import_function": "qs::qread",
"export_function": "qs::qsave",
Expand All @@ -636,7 +636,7 @@
"format_name": "Serialized R objects (qs2)",
"import_function": "qs2::qs_save",
"export_function": "qs2::qs_read",
"note": "Replaces {qs} package which will be deprecated."
"note": ""
},
{
"input": "xml",
Expand Down
5 changes: 1 addition & 4 deletions man/export.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading