Skip to contents

Downloads a file and returns its content directly, without leaving a copy on disk. These are the analogues of googledrive::drive_read_string() and googledrive::drive_read_raw().

Usage

pd_read_string(file, encoding = "UTF-8")

pd_read_raw(file)

Arguments

file

The file or folder to download, as a path, an ID marked with as_id(), or a one-row dribble.

encoding

Encoding of the file's text, passed to iconv().

Value

  • pd_read_string(): a single string.

  • pd_read_raw(): a raw vector.

Examples

if (FALSE) { # \dontrun{
pd_read_string("data/mtcars.csv") |> read.csv(text = _)
pd_read_raw("images/logo.png")
} # }