knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
RespChamberProc
package supports deriving gas fluxes from a time series of gas
concentrations in a chamber.
install.packages( # dependencies from CRAN c("rlang", "changepoint", "nlme", "segmented", "tibble", "dplyr", "purrr")) # install.packages("devtools") devtools::install_github("bgctw/RespChamberProc")
See the package vignettes for an introduction.
A simple example estimates photosynthesis (negative CO2 flux into the light chamber) in units micromol/second from CO2 concentration data in ppm.
library(RespChamberProc) #?RespChamberProc ds <- chamberLoggerEx1s # example data with the package ds$Pa <- chamberLoggerEx1s$Pa * 1000 # convert kPa to Pa ds$CO2_dry <- corrConcDilution(ds) # correct for water vapour resFit <- calcClosedChamberFlux( ds , colConc = "CO2_dry", colTime = "TIMESTAMP" , colTemp = "TA_Avg", colPressure = "Pa" # Temperature in K, Pressure in Pa , volume = 1, area = 1 # chamber dimensions m3 and m2 ) dplyr::select(resFit ,c("flux","sdFlux")) plotResp(ds, resFit, label = "Example Series")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.