select_subtree: Select a subtree

Description Usage Arguments Details Value See Also

Description

Selects a subtree of a lineage or division tree based on multiple selection criteria combined with logical AND operator(s).

Usage

1
select_subtree(tree, criteria)

Arguments

tree

The lineage or division tree from which to select a subtree, an object of class "igraph".

criteria

A list containing the selection criteria. Each criterion (element of the list) should be a named list with the following components:

attr

A character string naming the attribute in the tree on which the selection will be made. It can be any numeric or boolean attribute, as returned from get_attr_names.

val

The value of comparison. It should be a numeric value when attr is numeric and a logical value (TRUE or FALSE) when attr is boolean.

op

The comparison operator. It should be "==", "!=", "<", "<=", ">" or ">=" when attr is numeric and "==" or "!=" when attr is boolean.

Details

The selection is made on the nodes of the tree. Only edges whose endpoints are both included in the resulting subtree are included. Therefore, the resulting subtree may be disconnected.

Value

The selected subtree, an object of class "igraph".

See Also

isConnected for checking if a tree is connected, unite_trees for combining multiple selection criteria with logical OR operator(s).


vicstefanou/ViSCA documentation built on May 31, 2019, 10:50 p.m.