| uploadDataObject | R Documentation |
Upload a DataObject to a DataONE member node.
uploadDataObject(x, ...) ## S4 method for signature 'D1Client' uploadDataObject( x, do, replicate = as.logical(FALSE), numberReplicas = NA, preferredNodes = NA, public = as.logical(FALSE), accessRules = NA, quiet = TRUE, ... )
x |
A D1Client instance. |
... |
(Not yet used.) |
do |
The DataObject instance to be uploaded to DataONE. |
replicate |
A value of type |
numberReplicas |
A value of type |
preferredNodes |
A list of |
public |
A |
accessRules |
Access rules of |
quiet |
A |
id The id of the DataObject that was uploaded
D1Client class description.
## Not run:
library(dataone)
library(datapack)
testdf <- data.frame(x=1:10,y=11:20)
csvfile <- tempfile(pattern = "file", tmpdir = tempdir(), fileext = ".csv")
write.csv(testdf, csvfile, row.names=FALSE)
d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2")
do <- new("DataObject", format="text/csv", mnNodeId=getMNodeId(d1c), filename=csvfile)
# Upload a single DataObject to DataONE (requires authentication)
newId <- uploadDataObject(d1c, do, replicate=FALSE, preferredNodes=NA , public=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.