IIRH: Convert Interpreting Indicators of Rangeland Health (IIRH)...

gather_rangeland_healthR Documentation

Convert Interpreting Indicators of Rangeland Health (IIRH) data into a tall, tidy data frame

Description

Given wide format IIRH data, create a tall format data frame usable by other terradactyl functions.

Usage

gather_rangeland_health_terradat(
  dsn = NULL,
  tblQualHeader = NULL,
  tblQualDetail = NULL
)

gather_rangeland_health_lmf(dsn = NULL, file_type = NULL, RANGEHEALTH = NULL)

gather_rangeland_health(
  dsn = NULL,
  source,
  file_type = NULL,
  tblQualHeader = NULL,
  tblQualDetail = NULL,
  RANGEHEALTH = NULL,
  autoQC = TRUE
)

Arguments

dsn

Character string. The full filepath and filename (including file extension) of the geodatabase or text file containing the table of interest. This field is unnecessary if you provide either both of tblQualHeader and tblQualDetail (AIM/DIMA/TerrADat) or RANGEHEALTH (LMF/NRI).

tblQualHeader

Dataframe of the data structure tblQualHeader from the DIMA database with the addition of PrimaryKey and DBKey fields. Use with tblQualDetail when data source is AIM, DIMA, or TerrADat; alternately provide dsn.

tblQualDetail

Dataframe of the data structure tblQualDetail from the DIMA database with the addition of PrimaryKey and DBKey fields. Use with tblQualHeader when data source is AIM, DIMA, or TerrADat; alternately provide dsn.

file_type

Character string that denotes the source file type of the LMF/NRI data, "gdb" or "txt". Not necessary for AIM/DIMA/TerrADat, or if RANGEHEALT is provided.

RANGEHEALTH

Dataframe of the data structure RANGEHEALTH from the LMF/NRI database. Use when data source if LMF or NRI; alternately provide dsn.

source

Character string. The data source format, "AIM", "TerrADat", "DIMA", "LMF", "NRI" (case independent).

Value

A tall data frame containing the data from the rangeland health measurements.

See Also

Other <gather>: gather_all(), gather_gap(), gather_height(), gather_lpi(), gather_plot_characterization(), gather_soil_horizon(), gather_soil_stability(), gather_species_inventory()

Examples

gather_rangeland_health(dsn = "Path/To/AIM_Geodatabase.gdb",
                        source = "AIM")
gather_rangeland_health(dsn = "Path/To/LMF_Geodatabase.gdb",
                        source = "LMF")

aim_rhdetail <- read.csv("Path/To/tblQualDetail.csv")
aim_rhheader <- read.csv("Path/To/tblQualHeader.csv")
gather_rangeland_health(source = "AIM",
                        tblQualDetail = aim_rhdetail,
                        tblQualHeader = aim_rhheader)

lmf_rh <- read.csv("Path/To/RANGEHEALTH.csv")
gather_rangeland_health(source = "LMF",
                        RANGEHEALTH = lmf_rh)

smccord/terradactyl documentation built on Sept. 12, 2024, 2:17 p.m.