Skip to contents

Write a data file from R to create a new document version

Usage

write_data_version(x, document_uuid, ..., use_proxy = FALSE)

Arguments

x

R object to write to file.

document_uuid

UUID of existing document

...

Additional arguments to pass to write function. See details.

use_proxy

Logical to indicate whether to use proxy

Value

An httr2 httr2::response() (invisibly)

Details

This function can be used to write the following data file types: csv, rds, xlsx. The file type used is determined by the file type of the existing document.

The function works by writing the R object to a temporary file and uploading the file to Objective Connect. The following functions are used to write the data and any additional arguments (...) will be passed to these.

File TypeFunction
csvreadr::write_csv()
rdsreadr::write_rds()
xlsxwritexl::write_xlsx()

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