Skip to content

Commit

Permalink
Support read_rds reading from URLs
Browse files Browse the repository at this point in the history
Fixes #1186
  • Loading branch information
jimhester committed May 6, 2021
1 parent 4d60e7c commit 744fdb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

## Additional features and fixes

* `read_rds()` can now read .Rds files from URLs (#1186)

* `read_*()` functions gain a `show_col_types` argument, if set to `FALSE` this turns off showing the column types unconditionally.

* readr now uses the clock package when parsing date-times (@DavisVaughan, r-lib/vroom#273)
Expand Down
5 changes: 4 additions & 1 deletion R/rds.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
#' write_rds(mtcars, "compressed_mtc.rds", "xz", compression = 9L)
#' }
read_rds <- function(file) {
readRDS(file)
con <- file(file)
on.exit(close(con))

readRDS(con)
}


Expand Down

0 comments on commit 744fdb4

Please sign in to comment.