A fast and lazy way to upload R objects to box.com in a commonly readable
file format. read_fun
is used to convert R objects to files, which
by default is the export()
function from the rio
package.
rio()
's rio::export()
function currently only
supports data.frame
s; for lists jsonlite::toJSON()
may
be more appropriate.
Note: box_write
is for writing files in standard formats to box.com.
To upload R objects as .RData
files, see box_save()
.
box_write(x, filename, dir_id = box_getwd(), description = NULL, write_fun = rio::export, ...)
x | An R object |
---|---|
filename | The name for the file to be uploaded |
dir_id | If uploading, the box.com folder id that you'd like to upload to. |
description | Optional. |
write_fun | The function used to write the R object to a file |
... | Additional arguments passed to |
An object of class boxr_file_reference.