joinLocEvent: joinLocEvent: compile Location and Event data with filtering...

View source: R/joinLocEvent.R

joinLocEventR Documentation

joinLocEvent: compile Location and Event data with filtering options.

Description

This function combines location and event data. Must run importData first.

Usage

joinLocEvent(
  park = "all",
  from = 2007,
  to = as.numeric(format(Sys.Date(), "%Y")),
  QAQC = FALSE,
  abandoned = FALSE,
  panels = 1:4,
  locType = c("VS", "all"),
  eventType = c("complete", "all"),
  output = "short"
)

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

"ASIS"

Assateague Island National Seashore

"BOWA"

Booker T. Washington NM only

"COLO"

Colonial NHP 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 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

abandoned

Allows you to include (TRUE) or remove (FALSE; Default.) or abandoned plots.

FALSE

Default. Only returns plots that were not rejected.

TRUE

returns all records

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.

eventType

Allows you to include only complete sampling events or all sampling events

"complete"

Default. Only include sampling events for a plot that are complete.

"all

Include all plot events with a record in tblCOMN.Event, including plots missing most of the data associated with that event (eg COLO-380.2018). This feature is currently hard-coded in the function.

output

Allows you to return all columns or just the most important columns for analysis. Valid inputs are "short" and "verbose".

Value

returns a dataframe with location and visit events

Examples

## Not run: 
importCSV('./forest_csvs')
# Select most recent survey of data from APCO
APCO_data <- joinLocEvent(park = 'APCO',from = 2016, to = 2019)

# Select data from cycle 3 for RICH and FRSP
cycle3 <- joinLocEvent(park = c("RICH", "FRSP"), from = 2015, to = 2018) # all parks is default

# Select data from plots that had a QA/QC event in GETT in 2019
GETT_data <- joinLocEvent(park = 'GETT', QAQC = TRUE, from = 2019)
QAQC_plots <- GETT_data$Plot_Name[which(GETT_data$Event_QAQC == TRUE)]
GETT_QAQC <- GETT_data %>% filter(Plot_Name %in% QAQC_plots)

## End(Not run)


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