Check for complete and correct soil physical parameters
Source:R/check_soilphys.R
check_soilphys.Rd
This function analyses the soilphys dataframe before the flux calculation. It presents a warning, if there are variables missing and also looks for suspicious patterns that suggest an error in the interpolation made by discretize_depth. Mainly checks if certain columns are present and if they are missing, if they can be calculated from the data present. Looks for the following columns by default: "upper","lower","TPS","SWC","AFPS","t","p","DSD0","D0","DS"
Usage
check_soilphys(df, extra_vars = c(), id_cols)
See also
Other soilphys:
complete_soilphys()
,
discretize_depth()
,
soilphys_layered()
Examples
{
data("soilphys")
check_soilphys(soilphys,id_cols = c("site"))
}
#> --------------------------------------------------------
#> your soilphys-dataframe is
#> ready
#> the following parameters are still missing:
#>
#> please note that for DSD0 calculation,
#> there may be individual prerequesits of the
#> fitting parameters you applied. (If so: provide extra_vars =
#> c('my variable'))
#>
#> the following parameters have depths with all NA
#> please check if they were discretized correctly
#> --------------------------------------------------------
#> $result
#> [1] TRUE
#>
#> $suspects
#> # A tibble: 0 × 4
#> # Groups: site [0]
#> # ℹ 4 variables: site <chr>, upper <dbl>, param <chr>, value <lgl>
#>