labDataOutMI: Function to return adaps_lab_samples df derived from...

View source: R/labDataOutMI.R

labDataOutMIR Documentation

Function to return adaps_lab_samples df derived from previously merged data

Description

This function accepts a data frame of data for a site/storm event, storm start dates, storm end dates, storm names, maximum volume in one sample bottle, and maximum volume for an entire storm sample

Usage

labDataOutMI(
  adaps_data_all,
  StormStart,
  StormEnd,
  StormName,
  maxBottleVol,
  maxSampVol,
  removeDate = NA,
  subNum = -9
)

Arguments

adaps_data_all

data frame containing merged ADAPS data for the requested site and date range

StormStart

vector of datetimes for storm starts

StormEnd

vector of datetime for storm ends

StormName

vector of storm names

maxBottleVol

vector of maximum volumes in one subsample bottle

maxSampVol

vector of maximum volumes of one total sample

removeDate

vector of datetimes to be removed from the calculation

subNum

vector of starting numbers for first bottle of each storm event

Value

tableOut list of a table for each storm event of bottle volumes

Examples

rdbExample <- rdbExample
maxBottleVol <- c(400,600,600,600,600,600,600,400,600,800)
maxSampVol <- c(3900,3900,3900,3900,3900,3900,3900,3900,3900,3900)
StormStart <- c("2008-05-30 02:51","2008-06-05 04:39","2008-06-06 04:22",
                "2008-06-07 22:52","2008-06-08 08:41","2008-06-08 19:03",
                "2008-06-12 09:03","2008-06-12 21:40","2008-06-14 16:52",
                "2008-06-15 04:07")
StormEnd <- c("2008-05-30 08:49","2008-06-05 07:21","2008-06-06 05:28",
              "2008-06-08 01:14","2008-06-08 11:39","2008-06-08 21:31",
              "2008-06-12 10:22","2008-06-13 01:36","2008-06-14 18:05",
              "2008-06-15 09:22")
StormName <- c("S2-066","S2-067","S2-068","S2-069","S2-070","S2-071",
               "S2-072","S2-073","S2-074","S2-075")
subNum <- c(1,1,1,1,16,1,1,5,1,7)
labDataOut(rdbExample,StormStart,StormEnd,StormName,
           maxBottleVol,maxSampVol)

USGS-R/SampleSplitting documentation built on Oct. 18, 2022, 9:19 a.m.