mean_w: Calculate the Mean Wetness Coefficient

View source: R/wet_metric.R

mean_wR Documentation

Calculate the Mean Wetness Coefficient

Description

mean_w calculates the mean wetness coefficient for all species in the site assessment. The wetness coefficient is based on wetland indicator status. Negative wetness coefficients indicate a stronger affinity for wetlands, while positive wetness coefficients indicate an affinity for uplands.

Usage

mean_w(x, key = "name", db, native = FALSE, allow_no_c = TRUE)

Arguments

x

A data frame containing a list of plant species. This data frame must have one of the following columns: name or acronym. For cover-weighted or relative functions, this data frame must also have a column called cover containing cover values and ideally a column containing plot IDs.

key

A character string representing the column that will be used to join the input data frame x with the regional FQA database. If a value is not specified, the default is "name". "name" and "acronym" are the only acceptable values for key.

db

A character string representing the regional FQA database to use. See db_names for a list of potential values and the fqadata R package where the databases are hosted.

native

Boolean (TRUE or FALSE). If TRUE, calculate metrics using only native species.

allow_no_c

Boolean (TRUE or FALSE). If TRUE, allow species that are found in the regional FQA database but have not been assigned a C Values. If FALSE, omit species that have not been assigned C Values.

Value

A non-negative integer

Examples

plant_list <- crooked_island

#mean wetness of all species (native and introduced)
mean_w(x = plant_list, key = "acronym", db = "michigan_2014", native = FALSE)

#mean wetness of native species
mean_w(x = plant_list, key = "acronym", db = "michigan_2014", native = TRUE)

fqacalc documentation built on Sept. 26, 2023, 5:10 p.m.