View source: R/getStdAndMeanFunctions.R
getStdAndMeanFunctions | R Documentation |
getStdAndMeanFunctions
creates an average function multifunctionality index.
getStdAndMeanFunctions(data, vars, standardizeFunction = standardizeUnitScale)
data |
A data frame with functions. |
vars |
The column names of the functions to be assessed. |
standardizeFunction |
A function to standardize each individual
function to the same scale, such as |
iterates over all functions and standardizes them between 0 and 1. Then it creates an averaged multifunctionality index by averaging over all standardized functions
Returns a data frame with standardized values for each function and an averaged index.
Jarrett Byrnes.
data(all_biodepth) allVars <- qw(biomassY3, root3, N.g.m2, light3, N.Soil, wood3, cotton3) germany <- subset(all_biodepth, all_biodepth$location == "Germany") vars <- whichVars(germany, allVars) # re-normalize N.Soil so that everything is on the same # sign-scale (e.g. the maximum level of a function is # the "best" function) germany$N.Soil <- -1 * germany$N.Soil + max(germany$N.Soil, na.rm = TRUE) germany <- cbind(germany, getStdAndMeanFunctions(germany, vars))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.