gather_soil_summary: Gather TerrADat and LMF Soil data into a summary data frame

View source: R/gather_soil_summary.R

gather_soil_summaryR Documentation

Gather TerrADat and LMF Soil data into a summary data frame

Description

Given soil horizon and pit data, create a tall format data frame usable by other terradactyl functions.

Usage

gather_soil_summary_lmf(dsn = NULL, SOILHORIZON = NULL)

gather_soil_summary_terradat(
  dsn = NULL,
  tblSoilPitHorizons = NULL,
  tblSoilPits = NULL
)

gather_soil_summary(
  dsn = NULL,
  source,
  tblSoilPitHorizons = NULL,
  tblSoilPits = NULL,
  SOILHORIZON = NULL
)

Arguments

dsn

Character string. The full filepath and filename (including file extension) of the geodatabase containing the table of interest. This field is unnecessary if you supply either both of tblSoilPitHorizons and tblSoilPits (AIM/DIMA/TerrADat) or SOILHORIZON (LMF/NRI).

SOILHORIZON

Dataframe of the data structure SOILHORIZON from LMF/NRI database with the addition of PrimaryKey and DBKey fields. Use when data source is LMF or NRI; alternately provide dsn.

tblSoilPitHorizons

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

tblSoilPits

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

source

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

Value

A tall data frame summarizing horizon data to the soil pit

See Also

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

Examples

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

aim_horizons <- read.csv("Path/To/tblSoilPitHorizons.csv")
aim_pits <- read.csv("Path/To/tblSoilPits.csv")
gather_soil_summary(source = "AIM",
                    tblSoilPitHorizons = aim_horizons,
                    tblSoilPits = aim_pits)

lmf_horizons <- read.csv("Path/To/SOILHORIZON.csv")
gather_soil_summary(source = "LMF",
                    SOILHORIZON = lmf_horizons)

smccord/terradactyl documentation built on Dec. 1, 2023, 7:37 p.m.