getDataObject: Download a from the DataONE Federation as a DataObject.

Description Usage Arguments Details Value See Also Examples

Description

A convenience method to download a data object and its associated SystemMetadata, wrapped in a DataObject class.

Usage

1
2
3
4
5
getDataObject(x, identifier, ...)

## S4 method for signature 'D1Client'
getDataObject(x, identifier, lazyLoad = FALSE,
  limit = "1MB", quiet = TRUE)

Arguments

x

A D1Client object.

identifier

The identifier of the object to get.

...

(not yet used)

lazyLoad

A logical value. If TRUE, then only package member system metadata is downloaded and not data.

limit

A character value specifying maximum package member size to download. Specified with "KB", "MB" or "TB" for example: "100KB", "10MB", "20GB", "1TB". The default is "1MB".

quiet

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

Details

This method performs multiple underlying calls to the DataONE repository network. CN.resolve() is called to locate the object on one or more repositories, and then each of these is accessed until success at downloading the associated SystemMetadata and data bytes, which are finally wrapped in a DataObject and returned. Replaces previous getD1Object() method in the version 1 dataone library. The lazyLoad parameter specifies that only sysmeta metadata is downloaded and not the data itself. This argument is used together with the limit parameter, which specifies the maximum size of data object that will be downloaded. IF lazyLoad is FALSE, then limit is ignored.

Value

A DataObject or NULL if the object was not found in DataONE

See Also

D1Client class description.

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(dataone)
d1c <- D1Client("PROD", "urn:node:KNB")
pid <- "solson.5.1"
obj <- getDataObject(d1c, pid)
data <- getData(obj)

## End(Not run)

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