Learn R Programming

aster2 (version 0.1)

subset.asterdata: Subset Object Describing Saturated Aster Model

Description

Subset an object of class "asterdata", for which see asterdata.

Usage

## S3 method for class 'asterdata':
subset(x, subset, successors = TRUE, \dots)

Arguments

Value

an object of class "asterdata" that represents the aster model having subgraph with nodes specified by subset.

Details

Argument subset is a logical vector of the same length as the number of nodes in the graph specified by argument x. It indicates the subset of nodes in the subgraph wanted. The subgraph must be closed with respect to predecessors (all predecessors of nodes in the subset are also in the subset) and if successors = TRUE with respect to successors (all successors of nodes in the subset are also in the subset). And similarly for dependence groups: each dependence group in the original graph must have all or none of its elements in the subgraph.

See Also

asterdata

Examples

Run this code
data(echinacea)
#### select one individual from each level of pop
foo <- echinacea$redata$pop
bar <- match(levels(foo), as.character(foo))
baz <- is.element(echinacea$redata$id, echinacea$redata$id[bar])
out <- subset(echinacea, baz)

Run the code above in your browser using DataLab