gather_height: Convert height data into a tall, tidy data frame

gather_heightR Documentation

Convert height data into a tall, tidy data frame

Description

Given wide format line-point intercept data, create a tall format data frame usable by other terradactyl functions.

Usage

gather_height_terradat(dsn = NULL, tblLPIDetail = NULL, tblLPIHeader = NULL)

gather_height_lmf(dsn = NULL, file_type = "gdb", PASTUREHEIGHTS = NULL)

gather_height(
  dsn = NULL,
  file_type = "gdb",
  source,
  tblLPIDetail = NULL,
  tblLPIHeader = NULL,
  PASTUREHEIGHTS = 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 tblLPIDetail and tblLPIHeader (AIM/DIMA/TerrADat) or PASTUREHEIGHTS (LMF/NRI).

tblLPIDetail

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

tblLPIHeader

Dataframe of the data structure tblLPIHeader from the DIMA database with the addition of PrimaryKey and DBKey fields. Use with tblLPIDetail 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 PASTUREHEIGHTS is provided.

PASTUREHEIGHTS

Dataframe of the data structure PASTUREHEIGHTS from the LMF/NRI database; 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 height measurements.

See Also

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

Examples

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

aim_lpidetail <- read.csv("Path/To/tblLPIDetail.csv")
aim_lpiheader <- read.csv("Path/To/tblLPIHeader.csv")
gather_height(source = "AIM",
              tblLPIDetail = aim_lpidetail,
              tblLPIHeader = aim_lpiheader)

lmf_heights <- read.csv("Path/To/PASTUREHEIGHTS.csv")
gather_height(source = "LMF",
              PASTUREHEIGHTS = lmf_heights)

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