Learn R Programming

BioGeoBEARS (version 0.2.1)

check_if_state_is_allowed: Check if a geographic range/state is allowed, given an areas-allowed matrix.

Description

If the user has specified a matrix stating which areas are allowed to be connected (and thus have a species with a range in both areas), this function checks if the input list of areas (as a 0-based vector of areas) in a single state/geographic range is consistent with the areas-allowed matrix.

Usage

check_if_state_is_allowed(state_0based_indexes, areas_allowed_mat)

Arguments

state_0based_indexes
The input state is a 0-based vector of area indices.
areas_allowed_mat
A matrix (number of areas x number of areas) with 1s indicating allowed connections between areas, and 0s indicating disallowed connections.

Value

TRUE or FALSE

Details

This function may be used by e.g. apply.

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

See Also

apply

Examples

Run this code
test=1

Run the code above in your browser using DataLab