View source: R/dataset_export.R
dataset_export | R Documentation |
Export a dataset together with reference (DataCite and Dublin Core) metadata.
dataset_export(ds, file, filetype = "csv", ...)
dataset_export_csv(ds, file)
ds |
A dataset object. |
file |
A (path to) a file where to export the dataset object. |
filetype |
Currently only |
... |
Further parameters to be passed on to exporting functions. See details. |
This function is a wrapper around the exporting functions.It implements
file exports in a way that the resulting exported file contains reference metadata.
dataset_export_csv
is a wrapper around utils::write.csv
.
Use ... to pass on argument to that function.
The function write a desired file on disc and does not return anything.
dataset
my_iris_dataset <- dataset(
x = iris,
Dimensions = NULL,
Measures = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width" ),
Attributes = "Species",
Title = "Iris Dataset"
)
my_iris_dataset <- dublincore_add(
x = my_iris_dataset,
Creator = person("Edgar", "Anderson", role = "aut"),
Publisher = "American Iris Society",
Source = "https://doi.org/10.1111/j.1469-1809.1936.tb02137.x",
Date = 1935,
Language = "en"
)
dataset_export_csv(my_iris_dataset, file = file.path(tempdir(), "my_iris.csv"))
read.csv(file.path(tempdir(), "my_iris.csv"), skip=20)
read.csv(file.path(tempdir(), "my_iris.csv"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.