gather_gap: Convert gap data into a tall, tidy data frame

gather_gapR Documentation

Convert gap data into a tall, tidy data frame

Description

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

Usage

gather_gap_terradat(dsn = NULL, tblGapDetail = NULL, tblGapHeader = NULL)

gather_gap_lmf(dsn = NULL, file_type = NULL, GINTERCEPT = NULL, POINT = NULL)

gather_gap(
  dsn = NULL,
  file_type = "gdb",
  source,
  tblGapHeader = NULL,
  tblGapDetail = NULL,
  POINT = NULL,
  GINTERCEPT = 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 both of tblGapDetail and tblGapHeader (AIM/DIMA/TerrADat) or both of GINTERCEPT and POINT (LMF/NRI).

tblGapDetail

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

tblGapHeader

Dataframe of the data structure tblGapHeader from the DIMA database with the addition of PrimaryKey and DBKey fields. Use with tblGapDetail 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 GINTERCEPT and POINT are provided.

GINTERCEPT

Dataframe of the data structure GINTERCEPT from the LMF/NRI database. Use with POINT when data source is LMF or NRI; alternately provide dsn.

POINT

Dataframe of the data structure POINT from the LMF database. Use with GINTERCEPT 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 gap measurements.

See Also

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

Examples

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

aim_gapdetail <- read.csv("Path/To/tblGapDetail.csv")
aim_gapheader <- read.csv("Path/To/tblGapHeader.csv")
gather_gap(source = "AIM",
           tblGapDetail = aim_gapdetail,
           tblGapHeader = aim_gapheader)

lmf_gintercept <- read.csv("Path/To/GINTERCEPT.csv")
lmf_point <- read.csv("Path/To/POINT.csv")
gather_gap(source = "LMF",
           GINTERCEPT = lmf_gintercept,
           POINT = lmf_point)

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