View source: R/allfunctions_cati.R
partvar | R Documentation |
Variance partitioning accross nested scales using a decomposition (varcomp function) of variance on restricted maximum likelihood (REML) method (lme function). See Messier et al. 2010 for more information. barPartvar and piePartvar are associated plotting functions.
partvar(traits, factors, printprogress = TRUE) barPartvar(partvar, col.bar = NA, ...) piePartvar(partvar, col.pie = NA, ...)
traits |
Matrix of traits with traits in column |
factors |
A matrix of factors with the first column corresponds to the higher level factor, the second row the second higher level factor and so on. |
printprogress |
Logical value; print progress during the calculation or not. |
partvar |
The result of the partvar function. |
col.bar |
Vector of colors of bars |
... |
Any additional arguments are passed to the pie function. |
col.pie |
Vector of color for pie. |
An object of class "partvar" corresponding to a matrix of variance values with traits in rows and nested factors in column.
Adrien Taudiere Julie Messier
Messier, Julie, Brian J. McGill, et Martin J. Lechowicz. 2010. How do traits vary across ecological scales? A case for trait-based ecology: How do traits vary across ecological scales? Ecology Letters 13(7): 838-848. doi:10.1111/j.1461-0248.2010.01476.x.
piePartvar
;
barPartvar
data(finch.ind) ## Not run: cond<-seq(1,length(sp.finch)*2, by = 2) genus <- as.vector(unlist(strsplit(as.vector(sp.finch),"_"))[cond]) res.partvar.finch <- partvar(traits = traits.finch, factors = cbind(sites = as.factor(as.vector(ind.plot.finch)), species = as.factor(as.vector(sp.finch)), genus = as.factor(genus))) res.partvar.finch oldpar<-par() par(mfrow = c(2,2), mai = c(0.2,0.2,0.2,0.2)) piePartvar(res.partvar.finch) par(oldpar) barPartvar(res.partvar.finch) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.