gather_lpi: Convert line-point intercept (LPI) data into a tall, tidy...

gather_lpiR Documentation

Convert line-point intercept (LPI) 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_lpi_terradat(dsn = NULL, tblLPIDetail = NULL, tblLPIHeader = NULL)

gather_lpi_lmf(dsn = NULL, file_type = "gdb", PINTERCEPT = NULL)

gather_lpi(
  dsn = NULL,
  file_type = "gdb",
  source,
  tblLPIDetail = NULL,
  tblLPIHeader = NULL,
  PINTERCEPT = 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 PINTERCEPT (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 PINTERCEPT is provided.

PINTERCEPT

Dataframe of the data structure PINTERCEPT from the LMF/NRI database with the addition of PrimaryKey and DBKey fields. Use when source is 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 LPI pin intercepts

See Also

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

Examples

gather_lpi(dsn = "Path/To/AIM_Geodatabase.gdb",
           source = "AIM")
gather_lpi(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_lpi(source = "AIM",
           tblLPIDetail = aim_lpidetail,
           tblLPIHeader = aim_lpiheader)

lmf_pintercept <- read.csv("Path/To/PINTERCEPT.csv")
gather_lpi(source = "LMF",
           RANGEHEALTH = lmf_pintercept)

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