joinSoilSampleData: joinSoilSampleData: compile corrected soil sample data.

View source: R/joinSoilSampleData.R

joinSoilSampleDataR Documentation

joinSoilSampleData: compile corrected soil sample data.

Description

This function verifies whether O and A horizons were named corrected based on the joinSoilLabData() function, then compiles average sample depth by horizon. Must run importData first. Only works for complete visits and plots that haven't been abandoned. Note that Earthworms are summarized in joinStandData(). This function starts at 2007 because 2006 methods were pretty different.

Usage

joinSoilSampleData(
  park = "all",
  from = 2007,
  to = as.numeric(format(Sys.Date(), "%Y")),
  QAQC = FALSE,
  panels = 1:4,
  locType = c("VS", "all"),
  last_lab_year = 2019,
  ...
)

Arguments

park

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

"all"

Includes all parks in the network

"ACAD"

Acadia NP only

"MABI"

Marsh-Billings-Rockefeller NHP only

"MIMA"

Minute Man NHP only

"MORR"

Morristown NHP only

"ROVA"

Roosevelt-Vanderbilt NHS only

"SAGA"

Saint-Gaudens NHS only

"SARA"

Saratoga NHP only

"WEFA"

Weir Farm NHS only

from

Year to start analysis, ranging from 2007 to current year.

to

Year to stop analysis, ranging from 2007 to current year

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.

last_lab_year

The most recent year lab analyses have been completed for. This will allow non-lab QCed horizon data to be returned for years following. Otherwise, only QCed data horizon data are returned.

...

Other arguments passed to function.

Value

returns a dataframe containing each plot and visit with soil sample data.Tot_Samp_cm is the total depth of O and A sampled. Litter is not included in total depth calculation. Note soil chemistry data are typically a year behind plot data, so corrected soil horizon depths will also be a year behind. Soil horizon data not yet QCed by lab data are indicated by the Lab_QC (T/F) column. Plots that weren't sampled during a given cycle are not returned. Horizon depths are averaged across samples of the same horizon type.

Examples

## Not run: 
importData() #default imports
# join horizon depth data for the third cycle in ACAD.
soil_ACAD_O <- joinSoilSampleData(park = 'ACAD', from = 2014, to = 2017)

## End(Not run)

KateMMiller/forestNETN documentation built on April 1, 2024, 11:49 p.m.