View source: R/soilphys_layered.R
soilphys_layered | R Documentation |
This function calculates (harmonic-) means of the soilphys dataframe per layer for the flux calculation.
soilphys_layered(soilphys, layers_map, param, funs, id_cols)
soilphys |
(dataframe) the soilphys dataframe |
layers_map |
(dataframe) containing the following parameters:
|
param |
(character vector) A vector containing the names of the variables in soilphys to be carried over |
funs |
(character vector) A vector defining the type of mean to be used. One of "arith" or "harm" |
id_cols |
(character vector) A list of all columns, that, together, uniquely identify one profile. |
soilphys, reduced to any id_cols
and param
columns and
summarised to the layers provided in layers_map
#' @examples data(soildiff) layers_map <- data.frame(site = rep(c("site_a", "site_b"),each = 2), upper = c(5,0,7,0), lower = c(0,-100,0,-100), layer = rep(c("HU","M1"),times = 2) )
soildiff$depth <- (soildiff$upper + soildiff$lower) / 2
soilphys_layered(soilphys = soildiff, layers_map = layers_map, param = c("TPS","a"), funs = c("harm","arith"), id_cols = c("site"))
Other soilphys:
check_soilphys()
,
complete_soilphys()
,
discretize_depth()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.