Write data of resource to file
dp_write_data(x, ..., write_categories = TRUE)# S3 method for datapackage
dp_write_data(
x,
resource_name,
data,
writer = "guess",
...,
write_categories = TRUE
)
# S3 method for dataresource
dp_write_data(
x,
data,
datapackage = dp_get_datapackage(x),
writer = "guess",
...,
write_categories = TRUE
)
The function doesn't return anything. It is called for it's side effect of creating files in the directory of the Data Package.
the Data Package or Data Resource to which the data is to be written to.
additional arguments are passed on to the writer function.
write both the data set x
itself and any
categories lists of fields in the data set.
name of the Data Resource in the Data Package to which the data needs to be written.
data.frame
with the data to write.
the writer to use to write the data. This should be either a
function accepting the Data Package, name of the Data Resource, the data and
the write_categories
argument or the character string "guess"
.
the Data Package to which the data needs to be written.
When writer = "guess"
the function will try to guess which writer to
use based on the format
and mediatype
of the Data Resource.