View source: R/newdataresource.R
newdataresource | R Documentation |
Create a new Data Resource
newdataresource(name, title = NULL, description = NULL, ...)
name |
The name of the Data Resource. |
title |
The title of the Data Resource. |
description |
The description of the Data Resource. |
... |
Ignored for now. |
Returns a dataresource
object which is a list with the properties of
the Data Resource.
dir <- tempdir()
dp <- newdatapackage(dir, name = "test-package")
res <- newdataresource(name = "iris")
dptitle(res) <- "The Iris Data Set"
dpencoding(res) <- "UTF-8"
dpmediatype(res) <- "text/csv"
# resource adds a resource if it doesn't yet exist or updates
# an existing resource
dpresource(dp, "iris") <- res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.