uploadDataObject: Upload a DataObject to a DataONE member node.

Description Usage Arguments Value See Also Examples

Description

Upload a DataObject to a DataONE member node.

Usage

1
2
3
4
5
6
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 "logical", if TRUE then DataONE will replicate this object to other member nodes

numberReplicas

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 policy

quiet

A 'logical'. If TRUE (the default) then informational messages will not be printed.

Value

id The id of the DataObject that was uploaded

See Also

D1Client class description.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

dataone documentation built on July 2, 2018, 1:02 a.m.