Check that the app's the input data has matching land uses and correct carbon pools and associated factors.
Source:R/fct_check_data.R
fct_check_data.Rd
TBD
Value
A dataframe with TRUE or FALSE for each flag, (TRUE meaning the flag is raised and an issue was detected).
Examples
library(mocaredd)
library(readxl)
cs <- read_xlsx(
path = system.file("extdata/example1.xlsx", package = "mocaredd"),
sheet = "c_stocks",
na = "NA"
)
ad <- read_xlsx(
path = system.file("extdata/example1.xlsx", package = "mocaredd"),
sheet = "AD_lu_transitions",
na = "NA"
)
.init <- init <- list(
c_pools = c("AGB", "BGB", "RS", "DW", "LI", "SOC", "ALL", "DG_ratio"),
redd_acti = c("DF", "DG", "EN", "EN_AF", "EN_RE")
)
fct_check_data(.ad = ad, .cs = cs, .init = init)
#> pass_trans_id pass_c_id pass_pool pass_acti pass_lu_no
#> 1 TRUE TRUE TRUE TRUE TRUE