NWCA21_vegMMI: NWCA16_vegMMI: calculate Vegetation Multi-metric Index from...

View source: R/NWCA21_vegMMI.R

NWCA21_vegMMIR Documentation

NWCA16_vegMMI: calculate Vegetation Multi-metric Index from local JSON

Description

This function calculates the 4 metrics used to calculate the vegetation multi-metric index (MMI) developed by Miller et al. (2016). Note that to calculate the MMI, the species data must be joined with the Coefficient of Conservatism ranking. This is only implemented for EcoRegion 82 and downloads the CoCs from the Maine Natural Areas Program's website: https://www.maine.gov/dacf/mnap/features/coc.htm. This function is only implemented for ACAD sites and will break if the url hosting the CoC rankings changes. This function imports the local copies of the JSON files exported from EPA's app during the NWCA2021 that are needed to calculate the vegetation MMI. Each data frame is either added to the global environment or to an environment named NWCA21, based on whether new_env = TRUE or FALSE. Note that these are preliminary data sets that have not been fully QCed by EPA, and only includes sites from ACAD. Once NWCA21 data are made public, this function will be updated to include final data sets.

Usage

NWCA21_vegMMI(path = NA, new_env = TRUE, export_spp = TRUE)

Arguments

path

Quoted path of folder containing data files.

new_env

Logical. Specifies which environment to store data frames in. If TRUE(Default), stores data frames in NWCA21 environment. If FALSE, stores data frames in global environment

export_spp

Logical. If TRUE, adds a data frame called veg_spp_cov21 that contains average percent cover of all species recorded at a site to the global environment. If FALSE (default), only returns the final VMMI dataframe.

Value

Data frame with vegetation MMI metrics and ratings

Examples

## Not run: 

# Calculate vegMMI using local copies of veg forms in JSON format
NWCA21_vegMMI(path = "../data/NWCA21", new_env = FALSE)


## End(Not run)


KateMMiller/wetlandACAD documentation built on Oct. 22, 2023, 12:29 a.m.