gather_all: Gather tall tables for gap, vegetation height, LPI, plot...

View source: R/gather_all.R

gather_allR Documentation

Gather tall tables for gap, vegetation height, LPI, plot characterization, IIRH, soil horizon, soil pit summary, soil stability, and species inventory.

Description

Given wide format AIM/LMF data, gather gap, vegetation height, LPI, header, IIRH, soil horizon, soil pit summary, soil stability, and species inventory data. Missing tables will be skipped. AIM-type and LMF-type data will both be processed.

Usage

gather_all(
  dsn = NULL,
  dflist = NULL,
  outfolder,
  outtype = c("csv", "rdata"),
  verbose = T,
  doLPI = T
)

Arguments

dsn

Character string. The full filepath and filename (including file extension) of the geodatabase or text file containing thes table of interest. This field is unnecessary if you provide dflist.

dflist

Named list of data frames containing monitoring data. Tables must be named as expected by the individual gather_functions.

outfolder

Character string. Name of a folder to save all output to. If the specified folder does not exist, the function will create it.

outtype

Vector specifying output format, accepting "csv" and "rdata". Defaults to writing both.

verbose

True/False. When true, displays progress information, and reports missing input data.

doLPI

True/False. When false, LPI data will not be gathered. LPI data is large and the gather process is RAM-intensive. This function will function with fewer resources if LPI is run in batches, external to this wrapper.

Value

A list of tall data frames containing reformatted input data.

See Also

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

Examples

gather_all(dsn = "Path/To/AIM-LMF_Geodatabase.gdb", outfolder = "output")

names <- sf::st_layers(dsn = "Path/To/AIM-LMF_Geodatabase.gdb")$name
all_data <- sapply(names, function(n){## Gather Height Data
  sf::st_read(dsn = "Path/To/AIM-LMF_Geodatabase.gdb",
  layer = n, quiet = T)
})
gather_all(dflist = all_data, outfolder = "output")

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