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")
Run the code above in your browser using DataLab