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 "logical"
, if TRUE then DataONE will replicate this object to other member nodesnumberReplicas
: A value of type "numeric"
, for number of supported replicas.preferredNodes
: A list of "character"
, each of which is the node identifier for a node to which a replica should be sent.public
: A "logical"
value - if TRUE then the uploaded object will be publicly readable.accessRules
: Access rules of 'data.frame'
that will be added to the access policyquiet
: A 'logical'
. If TRUE (the default) then informational messages will not be printed.id The id of the DataObject that was uploaded
## 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)
D1Client
class description.