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 export
function currently only
supports data.frame
s; for lists 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, ...)
An R object
The name for the file to be uploaded
If uploading, the box.com folder id that you'd like to upload to.
Optional. character
. A string to be used as the
description caption for the file (added via
box_add_description
). Useful for describing the contents of a
file, or describing the latest changes made to it. If NULL
(the
default), no description is added.
The function used to write the R object to a file
Additional arguments passed to read_fun
An object of class
boxr_file_reference
.