subset.asterdata {aster2}R Documentation

Subset Object Describing Saturated Aster Model


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


## S3 method for class 'asterdata'
subset(x, subset, successors = TRUE, ...)



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


a logical vector indicating nodes of the graph to keep: missing values are taken as false.


a logical scalar indicating whether the subgraph must be a union of connected components of the original graph, that is, if all successors of nodes in the subset must also be in the subset.


further arguments, which are ignored (this argument is required for methods of the generic function subset but is not used for this method.)


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.


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

See Also



#### 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)

[Package aster2 version 0.3 Index]