Skip to contents

Read a data file into R

Usage

read_data(document_uuid, ..., use_proxy = FALSE)

Arguments

document_uuid

UUID of existing document

...

Additional arguments to pass to read function. See details.

use_proxy

Logical to indicate whether to use proxy

Value

For csv and xlsx files, a data frame. For rds files, an R object.

Details

This function can be used to read the following data file types: csv, rds, xlsx.

The function works by downloading the file from Objective Connect to a temporary file and reading it into R. The following functions are used to read the data and any additional arguments (...) will be passed to these.

File TypeFunction
csvreadr::read_csv()
rdsreadr::read_rds()
xlsxreadxl::read_xlsx()

To check what file type your document is (and thus what function additional arguments will be passed to), use asset_info().

If there are other data file types you would like to download using this function, please open an issue on the GitHub repository.