Skip to contents

The expected input carbon stock table for the tool contains carbon values of different carbon pools coded: - AGB for aboveground biomass, - BGB or RS (Root-to-Shoot ratio) for the belowground biomass, - DW for deadwood, - LI for litter and - SOC for soil organic carbon. All pools can be expressed in tons of Carbon (C) or CO2. AGB and BGB can also be expressed in ton of dry matter (DM), then a carbon fraction (CF) is also needed.

Usage

fct_check_pool(.c_lu, .c_unit, .c_fraction)

Arguments

.c_lu

Subset of the Carbon Stock input table (c_stock) for a unique land use

.c_unit

Unit used to report AGB (and BGB if included), from the shiny app or template user inputs.

.c_fraction

Value of carbon fraction, only if dry matter reported

Value

A dataframe with TRUE or FALSE for each pool and factor in the app's carbon stock input data for a given land use.

Examples

library(mocaredd)
library(readxl)
library(dplyr)

path <- system.file("extdata/example1-4pools.xlsx", package = "mocaredd")

cs <- read_xlsx(path = path, sheet = "c_stocks", na = "NA")

c_lu <- cs |> filter(lu_id == "ev_wet_closed")
#> Error in filter(cs, lu_id == "ev_wet_closed"):  In argument: `lu_id == "ev_wet_closed"`.
#> Caused by error:
#> ! object 'lu_id' not found

fct_check_pool(.c_lu = c_lu, .c_unit = "C", .c_fraction = NA)
#> Error in fct_check_pool(.c_lu = c_lu, .c_unit = "C", .c_fraction = NA): unused argument (.c_lu = c_lu)