kbl_by_types {businessPlanR}R Documentation

Format table from collection of types of operations objects

Description

This method uses the kableExtra package for table formatting.

Usage

kbl_by_types(
  obj,
  types,
  resolution = c("year", "quarter", "month"),
  currency = "€",
  digits = 0,
  DIY = FALSE,
  font_size = NULL,
  latex_options = "striped",
  stripe_color = "gray!6",
  years = get_period(obj, years = TRUE),
  sum_names = c(subtotal = "Subtotal", total = "Total"),
  type_colors = c(color = "white", background = "grey"),
  space = c(html = " ", latex = "\\,"),
  ...
)

## S4 method for signature 'operations'
kbl_by_types(
  obj,
  types,
  resolution = c("year", "quarter", "month"),
  currency = "€",
  digits = 0,
  DIY = FALSE,
  font_size = NULL,
  latex_options = "striped",
  stripe_color = "gray!6",
  years = get_period(obj, years = TRUE),
  sum_names = c(subtotal = "Subtotal", total = "Total"),
  type_colors = c(color = "white", background = "grey"),
  space = c(html = " ", latex = "\\,"),
  ...
)

Arguments

obj

An object of class operations or loan.

types

A named character vector of types to fetch from obj and print in the resulting table. Names must be the type names, their value must be one of "revenue" or "expense" so the method knows what to use in case identical type names are defined for both.

resolution

One of "month", "quarter", or "year".

currency

Character defining a currency symbol.

digits

Integer, round values to number of digits.

DIY

Logical, if TRUE returns the kable object prior to any row packing, specs or kable styling, so you can apply all of those as you wish.

font_size

Passed to kable_styling.

latex_options

Passed to kable_styling.

stripe_color

Passed to kable_styling.

years

Character (or numeric) vector defining the year(s) to be represented in the output. This is intended to be useful for splitting up quarterly or monthly output.

sum_names

A named character vector with two entries, subtotal and total, to be used in the resulting table for those values.

type_colors

A named character vector with two entries, color and background, defining the color scheme for type headlines.

space

Character, a space definition to put between currency and value.

...

Additional arguments passed on to kbl.

Value

An object of class kable.


[Package businessPlanR version 0.1-0 Index]