condense {businessPlanR}R Documentation

Condense operations objects into neat data frame

Description

Uses the provided model to create a data frame from the operations object. Depending on the type of data frame requestet (i.e., default or cashflow) and the temporal resolution (month, quarter or year), various subsets of the overall data in obj are returned.

Usage

condense(
  obj,
  model = get_model(),
  resolution = c("year", "quarter", "month"),
  keep_types = TRUE,
  cashflow = FALSE,
  cf_init = 0,
  cf_names = c(begin = "Begin", end = "End"),
  years = get_period(obj, years = TRUE),
  digits = 2
)

## S4 method for signature 'operations'
condense(
  obj,
  model = get_model(),
  resolution = c("year", "quarter", "month"),
  keep_types = TRUE,
  cashflow = FALSE,
  cf_init = 0,
  cf_names = c(begin = "Begin", end = "End"),
  years = get_period(obj, years = TRUE),
  digits = 2
)

Arguments

obj

An object of class operations.

model

A named list of named lists describing the stepwise accounting rules for all data in in obj.

resolution

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

keep_types

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.

cashflow

Logical, whether the model describes a cashflow 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.

cf_init

Numeric, used as the initial value for cashflow calculations if cashflow=TRUE; i.e., the first beginning cash value.

cf_names

Character vector with two entries named begin and end, used in the resulting table for beginning cash and ending cash.

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.

digits

Number of digits used for rounding values, disabled if set to NA.

Value

A data frame with a subset of the financial transactions of obj.


[Package businessPlanR version 0.1-0 Index]