hilldiv (version 1.5.1)

is.nested: Check if hierachy is nested

Description

Multi-level diversity partitioning requires the groups at different hierarchical levels to be nested. i.e. two samples that belong to a common parent group cannot have different grandparent groups. The best example of nested hierarchy is taxonomy: e.g. two species that belong to the same genus cannot belong to different families. This function checks whether the groups specified in a hierarchy table have a nested structure.

Usage

is.nested(hierarchy)

Arguments

hierarchy

A matrix indicating the relation between samples (first column) and parent groups.

Value

A logical value (TRUE/FALSE).

Details

Check if hierachy is nested

Examples

Run this code
# NOT RUN {
data(bat.diet.hierarchy)
is.nested(bat.diet.hierarchy)
# }

Run the code above in your browser using DataLab