is.nested {hilldiv}R Documentation

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.

Details

Check if hierachy is nested

Value

A logical value (TRUE/FALSE).

Author(s)

Antton Alberdi, anttonalberdi@gmail.com

Examples

data(bat.diet.hierarchy)
is.nested(bat.diet.hierarchy)

[Package hilldiv version 1.5.1 Index]