Get the data content of a specified data object

Share:

Description

Get the data content of a specified data object

Usage

1
2
3
4
5
6
7
getData(x, ...)

## S4 method for signature 'DataObject'
getData(x)

## S4 method for signature 'DataPackage'
getData(x, id)

Arguments

x

DataObject or DataPackage: the data structure from where to get the data

...

Additional arguments

id

Missing or character: if 'x' is DataPackage, the identifier of the package member to get data from

Value

raw representation of the data

See Also

DataObject-class

Examples

1
2
3
4
5
6
7
8
9
data <- charToRaw("1,2,3\n4,5,6\n")
do <- new("DataObject", "id1", dataobj=data, "text/csv", 
  "uid=jones,DC=example,DC=com", "urn:node:KNB")
bytes <- getData(do)
dp <- new("DataPackage")
data <- charToRaw("1,2,3\n4,5,6")
do1 <- new("DataObject", id="id1", data, format="text/csv", user="smith", mnNodeId="urn:node:KNB")
dp <- addData(dp, do1)
bytes <- getData(dp, "id1")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.