selectDataAfterLag: selectDataAfterLag

View source: R/fluxEstimates.R

selectDataAfterLagR Documentation

selectDataAfterLag

Description

Omit the data within lag-time and normalize times to start after lag

Usage

selectDataAfterLag(ds, colConc = "CO2_dry", 
    colTime = "TIMESTAMP", tLagFixed = NA, 
    maxLag = 50, tLagInitial = 10, minTimeDataAfterBreak = 30, 
    minTLag = 0)

Arguments

ds

a tibble or data.frame with time and concentration columns

colConc

column name of CO2 concentration per dry air [ppm]

colTime

column name of time column [s]

tLagFixed

possibility to specify the lagTime (in seconds) instead of estimating them

maxLag

number of initial records to be screened for a breakpoint, i.e. the lag

tLagInitial

the initial estimate of the length of the lag-phase

minTimeDataAfterBreak

number of minimum time (in seconds) left after breakpoint

minTLag

possibility to specify a minimum lag-time in seconds

Value

A list with entries

lagIndex

the index of the end of the lag period

ds

the dataset ds without the lag-period (lagIndex included)

Author(s)

Thomas Wutzler, Oscar Perez Priego

See Also

RespChamberProc

Examples

#data(chamberLoggerEx1s)
ds <- chamberLoggerEx1s
ds$CO2_dry <- corrConcDilution(ds)
#trace(selectDataAfterLag,recover)	#untrace(selectDataAfterLag)
ret <- selectDataAfterLag(ds)
plot( ds$CO2_dry)
abline(v = ret$lagIndex, col = "red")

bgctw/RespChamberProc documentation built on June 11, 2025, 3:52 p.m.