joinSoilLabData: joinSoilLabData: compile and QC soil chemistry data by...

View source: R/joinSoilLabData.R

joinSoilLabDataR Documentation

joinSoilLabData: compile and QC soil chemistry data by horizon.

Description

This function verifies whether O and A horizons were named corrected based on For duplicate horizons on a plot, chemistry variables are corrected using weighted averages, with sample depth as the weight. Must run importData first. Note that Earthworms are summarized in joinStandData(). Only works for complete visits and plots that haven't been abandoned. Note that soils have only been collected once per plot from 2010 to 2014, and have not been sampled in ASIS or COLO.

Usage

joinSoilLabData(
  park = "all",
  from = 2010,
  to = 2013,
  QAQC = FALSE,
  panels = 1:4,
  locType = c("VS", "all"),
  layer = c("all", "O", "A")
)

Arguments

park

Combine data from all parks or one or more parks at a time. Valid inputs:

"all"

Includes all parks in the network

"APCO"

Appomattox Court House NHP only

"BOWA"

Booker T. Washington NM only

"FRSP"

Fredericksburg & Spotsylvania NMP only

"GETT"

Gettysburg NMP only

"GEWA"

George Washington Birthplace NM only

"HOFU"

Hopewell Furnace NHS only

"PETE"

Petersburg NBP only

"RICH"

Richmond NB only

"SAHI"

Sagamore Hill NHS only

"THST"

Thomas Stone NHS only

"VAFO"

Valley Forge NHP only

from

Year to start analysis, ranging from 2010 to 2013.

to

Year to stop analysis, ranging from 2010 to 2013.

QAQC

Allows you to remove or include QAQC events.

FALSE

Default. Only returns visits that are not QAQC visits

TRUE

Returns all visits, including QAQC visits

panels

Allows you to select individual panels from 1 to 4. Default is all 4 panels (1:4). If more than one panel is selected, specify by c(1, 3), for example.

locType

Allows you to only include plots that are part of the GRTS sample design or include all plots, such as deer exclosures.

"VS"

Only include plots that are part of the Vital Signs GRTS sample design

"all"

Include all plots, such as plots in deer exclosures or test plots.

layer

Allows you to filter on soil horizons

"all"

Default. Includes O and A horizons.

"O"

Return only samples from the O horizon.

"A"

Return only samples from the A horizon.

Value

returns a dataframe containing each plot and visit with soil chemistry data for each horizon on a plot Plots that weren't sampled during a given cycle are not returned. Horizon depths are averaged across samples. Note that horizons that were combined after lab QC may be > 10 cm deep.

Examples

## Not run: 
importData() #imports using default odbc
# join only A horizon data for most FRSP
soil_FRSP_A <- joinSoilLabData(park = 'FRSP', from = 2010, to = 2013, layers = 'A')

# join all park data from all layers and all years
soil_df_all <- joinSoilLabData(layers = 'all')

## End(Not run)


KateMMiller/forestMIDN documentation built on Nov. 10, 2024, 11:54 p.m.