subsetContiguous: subsetContiguous

View source: R/dat.R

subsetContiguousR Documentation

subsetContiguous

Description

Get contiguous subsets

Usage

subsetContiguous(ds, colTime = "TIMESTAMP", 
    colIndex = "Collar", colMeasure = "CO2_dry", 
    gapLength = 12, minNRec = 20, minTime = 60, 
    indexNA = 0, fIsBadChunk = function(dsi) FALSE)

Arguments

ds

data.frame or tibble of measurements

colTime

column name that of time (POSIXct)

colIndex

column name of index variable (factor or integer)

colMeasure

column name of the concentration measurement

gapLength

minimal length of a gap between subsets (seconds)

minNRec

minimum number of records within one contiguous subset

minTime

minimum length of time (in seconds) that a contiguous subsets covers

indexNA

value of the index column, that signifies records not to use

fIsBadChunk

Details

The time series in logger data consists of several chunks of concentration measurments. In order to determine these chunks, either a change in an index variable (input by between the measurements) or a gap in time is used.

Between the actual series of measurements, the logger may record sparse data. These chunks are indicated by value indexNA in the index column or by shortness of the series. Only chunks with at least minNRec records and at least minTime seconds are reported. Others are neglected.

Value

Argument ds with between-Chunk rows omitted and an additional integer column iChunk that designates the chunk number.

Author(s)

Thomas Wutzler, Oscar Perez Priego


bgctw/RespChamberProc documentation built on Jan. 4, 2024, 6:12 a.m.