getEnvelopes {ppgm}R Documentation

getEnvelopes

Description

This function gets the bioclimate envelopes of species and nodes.

Usage

getEnvelopes(treedata_min, treedata_max, node_est)

Arguments

treedata_min

tree data object with min estimate of the climate envelope for each species.

treedata_max

tree data object with max estimate of the climate envelope for each species

node_est

the estimate of all the nodes, both min and max

Details

Function derives the minimum, and maximum of each climate variable

Value

An array containing climate envelopes for each node

Author(s)

A. Michelle Lawing, Alexandra F. C. Howard

See Also

ppgmMESS(), nodeEstimate, geiger::treedata

Examples

data(sampletrees)
data(occurrences)
tree <- sampletrees[[25]]
biooccu <- getBioclimVars(occurrences, which.biovars=1)
sp_data_min<- tapply(biooccu[,4],biooccu$Species,min)
sp_data_max<- tapply(biooccu[,4],biooccu$Species,max)
treedata_min <- geiger::treedata(tree,sp_data_min,sort=TRUE,warnings=F)
treedata_max <- geiger::treedata(tree,sp_data_max,sort=TRUE,warnings=F)
full_est <- nodeEstimateEnvelopes(treedata_min,treedata_max)
node_est <- full_est$est
example_getEnvelopes <- getEnvelopes(treedata_min, treedata_max, node_est)

[Package ppgm version 1.0.3 Index]