Learn R Programming

cati (version 0.8)

decomp_within: Variance partitioning for multiple traits

Description

This function decomposes the variation in community trait composition into three sources: (i) the intraspecific trait variability, (ii) the variability due to species turnover and (iii) their covariation is also separated. This decomposition is computed for the whole variation in the trait values and, The formula specified, across the contribution of various explanatory variables considered in the model. Barplot.decomp_within allow to plot the result of the decomposition.

Usage

decomp_within(traits = NULL, formula = ~1, ind.plot = NULL, sp = NULL, 
	printprogress = TRUE, ...)
	
	## S3 method for class 'decomp_within':
barplot(height, resume = TRUE, \dots)

Arguments

traits
Matrix of traits with traits in column
height
An object of class decomp_within obtain by the function decomp_within.
formula
The formula parameter must be a one-sided formula, i.e. starting with a tilde (~) character. The response variable is specified by the next two arguments, specif.avg and const.avg. By default set to ~1.
ind.plot
Factor defining the name of the plot (site or community) in which the individual is.
sp
Factor defining the species which the individual belong to.
printprogress
Logical value; print progress during the calcul or not.
resume
Logical. If resume=FALSE, plot one graphic by traits.
...
Optional additional arguments

Value

  • An object of class "decomp_within".

References

Leps, Jan, Francesco de Bello, Petr Smilauer and Jiri Dolezal. 2011. Community trait response to environment: disentangling species turnover vs intraspecific trait variability effects. Ecography 34 (5): 856-863.

See Also

barplot.decomp_within; trait.flex.anova

Examples

Run this code
data(finch.ind)
	
	res.decomp<-decomp_within(traits=traits.finch, sp=sp.finch, 
	ind.plot=ind.plot.finch, print=FALSE)
	
	barplot.decomp_within(res.decomp)
	
	par(mfrow=c(2,2))
	barplot.decomp_within(res.decomp, resume=FALSE)
	par(mfrow=c(1,1))

Run the code above in your browser using DataLab