This method uses the kableExtra
package for table formatting.
kable_bpR(
obj,
model = get_model(),
resolution = c("year", "quarter", "month"),
keep_types = TRUE,
detailed = FALSE,
cashflow = FALSE,
currency = "€",
DIY = FALSE,
longtable_clean_cut = TRUE,
font_size = NULL,
latex_options = "striped",
stripe_color = "gray!6",
years = get_period(obj, years = TRUE),
detail_names = c(revenue = "Revenue", expense = "Exepense"),
detail_colors = c(color = "white", background = "grey"),
cf_init = 0,
cf_names = c(begin = "Begin", end = "End"),
space = c(html = " ", latex = "\\,"),
detail_width,
...
)# S4 method for operations
kable_bpR(
obj,
model = get_model(),
resolution = c("year", "quarter", "month"),
keep_types = TRUE,
detailed = FALSE,
cashflow = FALSE,
currency = "€",
DIY = FALSE,
longtable_clean_cut = TRUE,
font_size = NULL,
latex_options = "striped",
stripe_color = "gray!6",
years = get_period(obj, years = TRUE),
detail_names = c(revenue = "Revenue", expense = "Exepense"),
detail_colors = c(color = "white", background = "grey"),
cf_init = 0,
cf_names = c(begin = "Begin", end = "End"),
space = c(html = " ", latex = "\\,"),
detail_width,
...
)
# S4 method for loan
kable_bpR(
obj,
resolution = c("month", "quarter", "year"),
currency = "€",
DIY = FALSE,
font_size = NULL,
latex_options = "striped",
stripe_color = "gray!6",
loan_names = c(balance_start = "Balance start", interest = "Interest", principal =
"Principal", total = "Total", cumsum = "Cumulated", balance_remain =
"Balance remain"),
space = c(html = " ", latex = "\\,"),
...
)
# S4 method for transaction_plan
kable_bpR(
obj,
resolution = c("month", "quarter", "year"),
keep_types = FALSE,
currency = "€",
DIY = FALSE,
longtable_clean_cut = TRUE,
font_size = NULL,
latex_options = "basic",
stripe_color = "gray!6",
years = get_period(obj, years = TRUE),
dep_names = c(investment = "Investment", depreciation = "Depreciation", value =
"Value", sum = "Sum"),
loan_names = c(balance_start = "Balance start", interest = "Interest", principal =
"Principal", total = "Total", cumsum = "Cumulated", balance_remain =
"Balance remain", sum = "Sum"),
space = c(html = " ", latex = "\\,"),
zeroes = c(html = "#C0C0C0", latex = "gray!25"),
...
)
An object of class kable
.
An object of class operations
or loan
.
A named list of named lists describing the stepwise accounting rules
for all data in in obj
.
One of "month"
, "quarter"
, or "year"
.
Logical,
whether the returned data frame should keep the intermediate results
for each relevant type of transaction. This will add a column type
to the data frame.
Logical, supersedes keep_types
. If TRUE
,
the table includes detailed
information all the way down to types, categories, and transaction names.
Logical,
whether the model
describes a cash flow plan. If TRUE
,
calculations will start with the initial value as specified by cf_init
and use the
result of each period as the starting value of following periods. This only works if detailed=FALSE
.
Character defining a currency symbol.
Logical,
if TRUE
returns the kable
object prior to any row collapsing, column specs or kable styling,
so you can apply all of those as you wish.
Passed to collapse_rows
.
Passed to kable_styling
.
Passed to kable_styling
.
Passed to kable_styling
.
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.
A named character vector with two entries,
revenue
and expense
,
defining the global names used for the two transaction classes in the data frame if detailed=TRUE
.
A named character vector with two entries,
color
and background
, defining the color scheme
for position headlines (revenue and expense). Only relevant if detailed=TRUE
.
Numeric,
used as the initial value for cash flow calculations if cashflow=TRUE
; i.e.,
the first beginning cash value.
Character vector with two entries named begin
and end
,
used in the resulting
table for beginning cash and ending cash.
Character, a space definition to put between currency and value.
Optional vector of length 3,
if given defined the width of the three categorial columns,
Type
, Category
, and Name
.
Additional arguments passed on to kbl
.
Like dep_names
but with seven named entries,
balance_start
, interest
,
principal
, total
, cumsum
, balance_remain
, and sum
,
for loan plans, respectively.
A named character vector with four entries, investment
,
depreciation
, value
,
and sum
, used in table to describe the rows of each depreciation item,
with sum
only being used
in the final set of rows showing a summary over all items.
Named character vector defining the text color to use for zero amounts, for both LaTeX and HTML format.