Skip to content

Support remote reading for read_rds() #1186

Closed

Description

@msberends

Currently, it is possible to read remote files using most read_*() functions. But for read_rds(), that really only calls readRDS(), this does not work, which hinders downloading remote data sets from e.g. repositories.

Would it be an idea to support downloading prior to reading RDS files? As an example:

read_rds <- function(file) {
  if (grepl("^http", file, ignore.case = TRUE)) {
    # temp location
    file_local <- file.path(tempdir(), basename(file))
    # download the data set
    download.file(file, file_local, quiet = TRUE, mode = "wb")
    file <- file_local
  }
  readRDS(file)
}

Activity

  1. added a commit that references this issue on Apr 3, 2026
    744fdb4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions