Description Usage Arguments Details Value Author(s) Examples
Function cwm
calculates weighted mean of species attributes, using matrix of species composition and one or several species attributes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | cwm(com, traits, wstand = FALSE)
is.cwm(object)
## S3 method for class 'cwm'
object[i, j, drop = FALSE]
## S3 method for class 'cwm'
summary(object, long = FALSE, ...)
## S3 method for class 'cwm'
print(x, ...)
extract(x, ...)
## S3 method for class 'cwm'
extract(x, what = "traits", ...)
range_cwm(object, max = 9, recalculate = TRUE)
|
com |
Matrix or data frame with species composition data (samples x species). |
traits |
Vector, matrix or data frame with species attributes (species x attributes). This can be |
wstand |
Logical. Should be the values in |
object, x |
Object of the class |
i, j |
Subscripts of the matrix of the class "cwm" (rows and columns). |
drop |
Argument in the subsetting function, but currently not implemented ( |
long |
should summary return long output? (TRUE vs FALSE) |
... |
Other arguments passed into |
what |
Attributes extracted from the object of class |
max |
upper bound of the rescaled values |
recalculate |
should the mean values in |
Function [.cwm]
is for extracting specified rows and columns from matrix of class cwm
. As a side effect, resulting object will have concatenated the com
and traits
attributes to match the dimension of the resulting matrix. This function is only for extracting the parts of cwm
object, not for replacing - the attempt to replace will work, but will break the inner structure of the object.
Generic function extract
with argument what
applied on object of class "cwm"
extracts the original species composition matrix or species attribute matrix, respectively, which were used to calculate weighted means.
Function range_cwm
changes the range of species attributes and recalculates the CWM values.
Object of class "cwm"
, which has print
, summary
, as.matrix
and '[.'
methods. Object of "cwm"
class contains the matrix of calculated weighted means of species attributes for each sample (sample x weighted mean) and three attributes: com
, species x sample matrix from which the weighted mean was calculated, traits
, species x attributes matrix with species attributes, and wstand
, logical value specifying whether traits were weighted-standardized prior to calculation of CWM (weights are column sums of com
). All weighted means of species attributes must be based on the same species x sample matrix with the same number of samples.
David Zeleny (zeleny.david@gmail.com)
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.