removeMember: Remove the Specified Member from the Package

Description Usage Arguments Details See Also Examples

Description

Given the identifier of a DataObject in a DataPackge, delete the DataObject from the DataPackage.

Usage

1
2
3
4
removeMember(x, ...)

## S4 method for signature 'DataPackage'
removeMember(x, do, removeRelationships = FALSE)

Arguments

x

a DataPackage object

...

(Not yet used)

do

The package member to remove, either as a "DataObject" or "character" (for the object identifier)

removeRelationships

A logical value. If TRUE, package relationships for this package member are removed. Default is FALSE.

Details

The removeMember method removes the specified DataObject from the DataPackage. In addition, any package relationships that included the DataObject are removed.

See Also

DataPackage-class

Examples

1
2
3
4
5
6
dp <- new("DataPackage")
data <- charToRaw("1,2,3\n4,5,6")
do <- new("DataObject", id="myNewId", dataobj=data, format="text/csv", user="jsmith")
dp <- addMember(dp, do)
# Remove the package member and any provenance relationships that reference it.
removeMember(dp, "myNewId", removeRelationships=TRUE)

datapack documentation built on Aug. 29, 2017, 5:08 p.m.