addData,DataPackage,D1Object-method | R Documentation |
The D1Object do
is added to the data package x
.
## S4 method for signature 'DataPackage,D1Object' addData(x, do, mo = as.character(NA))
x |
The |
do |
A D1Object to add to the DataPackage |
mo |
A D1Object (containing metadata describing |
If the optional mo
parameter is specified, then it is assumed that this DataObject is a metadata
object that describes the data object that is being added. The DataObject specified in the mo
parameter will
also be added to the DataPackage, if it has not already been added. Then the addData
function will add a relationship
to the resource map that indicates that the metadata object describes the science object, using CiTO, the Citation Typing Ontology,
documents
and isDocumentedBy
relationships.
## Not run: library(dataone) library(datapack) library(uuid) dp <- new("DataPackage") d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2") # Create metadata object that describes science data newId <- sprintf("urn:uuid:%s", UUIDgenerate()) csvfile <- system.file("extdata/sample.csv", package="dataone") sciObj <- new("DataObject", id=newId, format="text/csv",filename=csvfile) dp <- addData(dp, do = sciObj) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.