gather_soil_horizon: Convert horizon data into a tall, tidy data frame

View source: R/gather_soil_horizon.R

gather_soil_horizonR Documentation

Convert horizon data into a tall, tidy data frame

Description

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

Usage

gather_soil_horizon_terradat(dsn = NULL, tblSoilPitHorizons = NULL)

gather_soil_horizon_lmf(dsn = NULL, SOILHORIZON = NULL)

gather_soil_horizon(
  dsn = NULL,
  source,
  SOILHORIZON = NULL,
  tblSoilPitHorizons = NULL
)

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 tblSoilPitHorizons (AIM/DIMA/TerrADat) or SOILHORIZON (LMF/NRI).

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.

SOILHORIZON

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

source

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

Value

A tall data frame containing soil horzon data.

See Also

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

Examples

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

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

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

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