table_risk: Creates LaTeX code to make a probability of risk table with...

View source: R/table-risk.R

table_riskR Documentation

Creates LaTeX code to make a probability of risk table with various probabilities of things happening with the stock

Description

Creates LaTeX code to make a probability of risk table with various probabilities of things happening with the stock

Usage

table_risk(
  model,
  forecast_yrs,
  index = 1,
  digits = 2,
  type = c("probability", "percent"),
  font_size = 10,
  header_font_size = 10,
  header_vert_spacing = 12,
  header_vert_scale = 1.2,
  ...
)

Arguments

model

A model from this project

forecast_yrs

A vector of forecast years

index

Index for which forecast year data to use. e.g. 1 = second forecast year compared to the first. If there were N forecast years, this can be from 1 to N-1

digits

The number of decimal places to print in the table output

type

One of probability or percent. If probability, the table columns will be decimal probabilities, if percent they will be expressed as percentages and a percent symbol (%) will be added to the column headers

font_size

The table data and header font size in points

header_font_size

The font size for the headers only. If NULL, the headers will have the same font size as the table cell data

header_vert_scale

Scale factor to create the vertical spacing value. See header_vert_spacing

...

Arguments passed to knitr::kable()

vert_spacing

The vertical spacing between newlines for this font. If NULL this will be calculated as header_font_size * header_vert_scale

Value

LaTeX code to render the table


pacific-hake/hake-assessment documentation built on Nov. 8, 2024, 1:16 p.m.