Skip to contents

Produce a gt table with the median and confidence interval of Monte Carlo simulations for each category of a level of the analysis (land use transition, REDD+ activity, time period) and a forest plot showing the median and CI together.

Usage

fct_forestplot(
  .data,
  .id,
  .value,
  .uperc,
  .cilower,
  .ciupper,
  .id_colname,
  .conflevel,
  .filename
)

Arguments

.data

a data frame containing the simulation aggregated results

.id

the name of the ID column of the data frame

.value

the name of the value column of the data frame (i.e median of the simulations)

.uperc

the name of the percentage uncertainty of the simulations

.cilower

the name of the lower end of confidence interval

.ciupper

the name of the higher end of the confidence interval

.id_colname

character text for the ID column names. goes to gt::md() in gt::cols_label()

.conflevel

character text to specify what confidence level was used, ex. "90%".

.filename

path to save the table or NA.

Value

A character value with the formula for calculating total carbon stock for a specific land use.