View source: R/comparative.comm.R
comparative.comm | R Documentation |
Basic checking of whether the input data match up is performed; you
need only supply comm
and phy
, nothing else is
mandatory. You can manipulate the internals of
comparative.comm
, or use the wrappers inside pez
to
keep everything in order. Examples of these features are given
below; they are described in detailed at cc.manip
.
comparative.comm( phy, comm, traits = NULL, env = NULL, warn = TRUE, force.root = -1 ) ## S3 method for class 'comparative.comm' print(x, ...)
phy |
phylogeny (in |
comm |
community |
traits |
|
env |
|
warn |
whether to warn if species/sites are dropped when creating object (default: TRUE) |
force.root |
if |
x |
|
... |
ignored |
comparative.comm object
comparative.comm
is compatible with
comparative.data
; this means
that the slot for species' trait data is called data
. I
appreciate this is somewhat unwieldy, but hopefully you agree it is
helpful in the long-term.
Will Pearse
plot.comparative.comm
cc.manip
link[caper:comparative.data]{comparative.data}
data(laja) data <- comparative.comm(invert.tree, river.sites, invert.traits, river.env) #Subset on species, then sites data <- data[1:5,] data <- data[,1:5] #Site and species can be manipulated species(data) sites(data)[1:3] <- c("lovely", "invert", "sites") #Other data can be viewed trait.names(data) env.names(data) #Get assemblage phylogenies of all sites assemblage.phylogenies(data) #Do some manual manipulation of your objects (NOTE: $data for traits) data$data$new.trait <- sample(letters, nrow(data$comm), replace=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.