dcdz_layered: dcdz_layered

View source: R/dcdz_layered.R

dcdz_layeredR Documentation

dcdz_layered

Description

This function calculates concentration gradients using different approaches.

Usage

dcdz_layered(df, layers_map, mode)

Arguments

df

(dataframe) the gasdata dataframe, filtered to one profile (e.g. 1 day & one Plot ).

layers_map

(dataframe) containing the following parameters:

  • "layer"=name of the layer;

  • "upper"=upper limit of layer in cm;

  • "lower" = lower limit of the layer in cm;

mode

(character) One of ("LL","LS","EF","DA").

Value

df (dataframe) same structure as layer_map with following columns:

mode (character) the used gradient method.

layer (character) the layer name

upper (numeric) upper boundary in cm

lower (numeric) lower boundary in cm

dcdz_ppm (numeric) concentration gradient in ppm/cm.

dcdz_sd (numeric) standard error in ppm/cm.

dc_ppm (numeric) concentration difference in ppm.

r2 (linearised) R^2 for the model.

Examples

{
df <- data.frame(depth = c(10,0,-100),
                 x_ppm = c(400,800,5000),
                 gd_id = c(1,1,1))

lmap <- data.frame(upper = c(10,0),
                   lower = c(0,-100),
                   layer = c("HU","MIN"))
dcdz_layered(df,
             lmap,
             mode = "LL"
)


}


valentingar/ConFluxPro documentation built on Dec. 1, 2024, 9:35 p.m.