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 |
model |
A named list of named lists describing the stepwise accounting rules
for all data in in |
resolution |
One of |
keep_types |
Logical,
whether the returned data frame should keep the intermediate results
for each relevant type of transaction. This will add a column |
cashflow |
Logical,
whether the |
cf_init |
Numeric,
used as the initial value for cashflow calculations if |
cf_names |
Character vector with two entries named |
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 |
Value
A data frame with a subset of the financial transactions of obj
.