View source: R/simulate_species.r
cor.mat.fun | R Documentation |
Generates a correlation matrix for the environmental variables generated in make.env
and for correlated species optima in species
. Only used when correlated environmental variables or optima are generated.
cor.mat.fun(ndim, cors)
ndim |
Number of environmental variables that are subsequently generated with |
cors |
List of correlations between environmental variables. Each element of the list consists of three numbers, the first two numbers indicate the variables that are correlated, the third number is the correlation coefficient. If correlations between two variables are omitted the correlation remains 0. |
Correlation matrix
Mathias Trachsel
make.env
, species
correlations <- list(c(1, 2, 0.5), c(1, 4, 0.1), c(2, 5, 0.6)) cor.mat <- cor.mat.fun(5, correlations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.