relative_cover | R Documentation |
relative_cover
calculates the total cover per group of interest (species,
taxonomic family, or physiognomic group) divided by the total cover for all
observations, then multiplied by 100. If the regional database does not have
information on species family or physiognomy, the function will return a data
frame with a single NA category.
relative_cover(
x,
key = "name",
db,
col = c("species", "family", "physiog"),
cover_class = "percent_cover",
allow_no_c = TRUE,
allow_non_veg = TRUE,
plot_id = NULL
)
x |
A data frame containing a list of plant species. This data frame
must have one of the following columns: |
key |
A character string representing the column that will be used to join
the input data frame |
db |
A character string representing the regional FQA database to use. See
|
col |
A character string representing the categorical variable to calculate the relative cover of. Can be set to "species", "family" or "physiog" (for physiognomy). |
cover_class |
a character string representing the cover classification used. Acceptable
cover classes are: |
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. |
allow_non_veg |
Boolean (TRUE or FALSE). If TRUE, allow input to contain un-vegetated ground and un-vegetated water. |
plot_id |
A character string representing the column in |
A data frame with categorical variables set by the col argument and their relative cover.
transect <- data.frame(
acronym = c("ABEESC", "ABIBAL", "AMMBRE", "ANTELE", "ABEESC", "ABIBAL", "AMMBRE"),
cover = c(50, 4, 20, 30, 40, 7, 60),
plot_id = c(1, 1, 1, 1, 2, 2, 2))
relative_cover(transect, key = "acronym", db = "michigan_2014", col = "species",
plot_id = "plot_id")
#can also include bare ground and unvegetated water
transect_unveg <- data.frame(acronym = c("GROUND", "ABEESC", "ABIBAL", "AMMBRE",
"ANTELE", "WATER", "GROUND", "ABEESC", "ABIBAL", "AMMBRE"),
cover = c(60, 50, 4, 20, 30, 20, 20, 40, 7, 60),
plot_id = c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2))
relative_cover(transect_unveg, key = "acronym", db = "michigan_2014",
col = "species", plot_id = "plot_id")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.