uploadDataObject {dataone} | R Documentation |
Upload a DataObject to a DataONE member node.
Description
Upload a DataObject to a DataONE member node.
Usage
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,
...
)
Arguments
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 |
Value
id The id of the DataObject that was uploaded
See Also
D1Client
class description.
Examples
## 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)
[Package dataone version 2.2.2 Index]