ppgmMESS {ppgm}R Documentation

ppgmMESS

Description

This creates a MESS map for given time slices, climate envelopes, and paleoclimate models.

Usage

ppgmMESS(cem_min, cem_max, est, tree, fossils=NULL, timeslice, 
which.biovars, path = "", use.paleoclimate=TRUE, paleoclimateUser = NULL, 
layerAge=c(0:20), which.plot = c("all","mess","none"))

Arguments

cem_min

the cem min output from the ppgm function. cbind() if there are multiple variables.

cem_max

the cem max output from the ppgm function. cbind() if there are multiple variables.

est

the node_est output from the ppgm function, in list format. [tree][1][min and max][no.of species]

tree

the phylogeny or multiple phylogenies that show the relationship between species

fossils

a matrix with four columns of age to the closest million year integer, longitude, and latitude, in that order, and rows that are entries for fossil occurrences.

timeslice

the time in million of years ago to project MESS maps (0 to 20). can handle single timeslice or vector of times.

which.biovars

the biovariable number(s) between 1 and 19.

path

directory where plots should be stored

use.paleoclimate

if left blank, default North America paleoclimate data is used. If FALSE, user submitted paleoclimate must be provided

paleoclimateUser

list of data frames with paleoclimates, must be dataframes with columns: GlobalID, Longitude, Latitude, bio1, bio2,...,bio19.

layerAge

vector with the ages of the paleoclimate dataframes, if using user submitted paleoclimate data

which.plot

"all" plots trait maps and MESS, "mess" plots MESS map, "none" does not plot

Details

plots MESS maps of climate envelope model for specific time slices. Can either plot individual biovariables, or combined.

Value

list containing array of MESS scores for bioclimatic variables

Author(s)

A. Michelle Lawing, Alexandra F. C. Howard, Maria-Aleja Hurtado-Materon

See Also

ppgm()

Examples

data(sampletrees)
data(occurrences)
sampletrees <- sample(sampletrees,5)
bounds <- list(sigsq = c(min = 0, max = 1000000))
test_ppgm <- ppgm(occurrences = occurrences,trees = sampletrees, 
model = "BM", which.biovars = c(1,4,15), bounds = bounds, 
control = list(niter = 20))
#extract min climate envelope for species
cem_min <- cbind(test_ppgm$cem[, 1], test_ppgm$cem[, 2], test_ppgm$cem[, 3])
cem_max <- cbind(test_ppgm$cem[, 7], test_ppgm$cem[, 8], test_ppgm$cem[, 9])
rownames(cem_min) <- rownames(cem_max) <- rownames(test_ppgm$cem)
mess <- ppgmMESS(cem_min,cem_max,test_ppgm$node_est,tree=sampletrees,timeslice=10,
which.biovars=c(1,4,15), path=tempdir(), which.plot="none")

[Package ppgm version 1.0.3 Index]