Description Usage Arguments Details Author(s) See Also Examples
View source: R/fluxEstimates.R
Estimate the initial flux by fitting a hyperbolic tangent saturating function
1 2  | regressFluxTanh(conc, times, start = c(), cSatFac = 2, 
    tryAutoCorr = TRUE)
 | 
conc | 
 numeric vector of CO2 concentrations []  | 
times | 
 times of conc measurements [seconds]  | 
start | 
 numeric vector of starting parameters. May provide from last bootstrap to speed up fitting  | 
cSatFac | 
 Position of the initial estimate of saturation (0 start, 1 end, >1 outside measured range)  | 
tryAutoCorr | 
 set to FALSE to not try to fit model with autocorrelation  | 
For efficiency reasons, does not check for missing values (NA). The caller must provide conc and times all finite.
Thomas Wutzler, Oscar Perez Priego
1 2 3 4 5 6 7 8 9  | #data(chamberLoggerEx1s)
ds <- chamberLoggerEx1s[-(1:16),]
conc <- ds$CO2_dry <- corrConcDilution(ds)  
times <- ds$TIMESTAMP
times0 <- as.numeric(times) - as.numeric(times[1])
#trace(regressFluxTanh, recover)	#untrace(regressFluxTanh)
(res <- regressFluxTanh( conc, times  ))
plot( conc ~ times)
lines( fitted(res$model) ~ times )
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.