dp_write_data {datapackage} | R Documentation |
Write data of resource to file
Description
Write data of resource to file
Usage
dp_write_data(x, ..., write_categories = TRUE)
## S3 method for class 'datapackage'
dp_write_data(
x,
resource_name,
data,
writer = "guess",
...,
write_categories = TRUE
)
## S3 method for class 'dataresource'
dp_write_data(
x,
data,
datapackage = dp_get_datapackage(x),
writer = "guess",
...,
write_categories = TRUE
)
Arguments
x |
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_categories |
write both the data set |
resource_name |
name of the Data Resource in the Data Package to which the data needs to be written. |
data |
|
writer |
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 |
datapackage |
the Data Package to which the data needs to be written. |
Details
When writer = "guess"
the function will try to guess which writer to
use based on the format
and mediatype
of the Data Resource.
Value
The function doesn't return anything. It is called for it's side effect of creating files in the directory of the Data Package.