subset.asterdata {aster2} | R Documentation |

## 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, ...)
```

### Arguments

`x` |
an object of class |

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

`successors` |
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 |

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

### Value

an object of class `"asterdata"`

that represents the aster model having
subgraph with nodes specified by `subset`

.

### See Also

### Examples

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

*aster2*version 0.3 Index]