Learn R Programming

ppgm (version 1.1)

getEnvelopes: getEnvelopes

Description

This function gets the bioclimate envelopes of species and nodes.

Usage

getEnvelopes(treedata_min, treedata_max, node_est)

Value

An array containing climate envelopes for each node

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

Author

A. Michelle Lawing, Alexandra F. C. Howard

Details

Function derives the minimum, and maximum of each climate variable

See Also

ppgmMESS(), nodeEstimate, geiger::treedata

Examples

Run this code
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)

Run the code above in your browser using DataLab