gather_plot_characterization: Convert plot data into a tall, tidy data frame

gather_plot_characterizationR Documentation

Convert plot data into a tall, tidy data frame

Description

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

Usage

gather_plot_characterization_terradat(dsn = NULL, tblPlots = NULL)

gather_plot_characterization_lmf(
  dsn = NULL,
  POINT = NULL,
  POINTCOORDINATES = NULL,
  GPS = NULL,
  ESFSG = NULL,
  file_type = NULL
)

gather_plot_characterization(
  dsn = NULL,
  source,
  tblPlots = NULL,
  POINT = NULL,
  POINTCOORDINATES = NULL,
  GPS = NULL,
  ESFSG = NULL,
  file_type = "gdb"
)

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

tblPlots

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

POINT

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.

POINTCOORDINATES

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

GPS

Dataframe of the data structure GPS from the LMF/NRI database with the addition of PrimaryKey and DBKey fields. Use when source is LMF or NRI; alternately provide dsn. #' @param 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 POINT, POINTCOORDINATES, and GPS are provided.

source

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

Value

A tall data frame containing plot characterization data

See Also

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

Examples

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

aim_plots <- read.csv("Path/To/tblPlots.csv")
gather_plot_characterization(source = "AIM",
                             tblPlots = aim_plots)

lmf_pintercept <- read.csv("Path/To/PINTERCEPT.csv")
lmf_pointcoords <- read.csv("Path/To/POINTCOORDINATES.csv")
lmf_gps <- read.csv("Path/To/GPS.csv")
gather_plot_characterization(source = "LMF",
                             PINTERCEPT = lmf_pintercept,
                             POINTCOORDINATES = lmf_pointcoords,
                             GPS = lmf_gps)

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