These methods return the requested slots from objects of class
operations,
revenue,
expense,
transaction_plan,
loan or
depreciation,
or, in case of their <- counterparts, replace slots with a given value.
get_revenue(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year"),
only_type,
not_type
)# S4 method for operations
get_revenue(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year"),
only_type,
not_type
)
get_expense(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year"),
only_type,
not_type
)
# S4 method for operations
get_expense(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year"),
only_type,
not_type
)
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
# S4 method for transaction_plan
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
# S4 method for loan
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
# S4 method for depreciation
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
# S4 method for revenue
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
# S4 method for expense
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
get_loans(obj, as_data_frame = TRUE)
# S4 method for operations
get_loans(obj, as_data_frame = TRUE)
get_plan(obj, type, category, name, valid_types = "default")
# S4 method for transaction_plan
get_plan(obj, type, category, name, valid_types = "default")
get_period(obj, years = FALSE)
# S4 method for operations
get_period(obj, years = FALSE)
# S4 method for transaction_plan
get_period(obj, years = FALSE)
# S4 method for loan
get_period(obj, years = FALSE)
# S4 method for depreciation
get_period(obj, years = FALSE)
get_depreciation_plan(obj, as_data_frame = TRUE)
# S4 method for operations
get_depreciation_plan(obj, as_data_frame = TRUE)
get_plan_type(obj)
# S4 method for transaction_plan
get_plan_type(obj)
get_misc(obj, name)
# S4 method for operations
get_misc(obj, name)
set_misc(obj, name) <- value
# S4 method for operations
set_misc(obj, name) <- value
list_plans(obj)
# S4 method for transaction_plan
list_plans(obj)
get_sum(obj)
# S4 method for revenue
get_sum(obj)
# S4 method for expense
get_sum(obj)
as_transaction(obj, to, aspect, valid_types = "default", type)
# S4 method for loan
as_transaction(
obj,
to = c("revenue", "expense"),
aspect = c("interest", "balance_start", "principal", "total", "cumsum",
"balance_remain"),
valid_types = "default",
type
)
# S4 method for depreciation
as_transaction(
obj,
to = c("revenue", "expense"),
aspect = c("investment", "depreciation", "value"),
valid_types = "default",
type
)
Depending on the method, either a data frame or a numeric value.
An object of class
operations,
revenue,
expense,
transaction_plan,
loan or
depreciation.
Logical, whether to drop or keep columns specifying type, category or name or rows.
One of "month", "quarter", or "year".
Optional character vector, if given,
only rows with matching type are returned.
Overrides not_type if both are provided.
Optional character vector, if given, only rows with types not matching the vector entries are returned.
Logical,
if FALSE returns an object of class transaction_plan
instead of a data frame.
Character string, a valid type name for the resulting object.
A character string, custom category for this transaction.
Character or integer, specifying which element to get/set. If missing, the whole list is returned/replaced.
A character string, the model types defined by
set_types to be used for validation.
If "default", pre-defined example types are used.
Logical,
if TRUE doesn't return the period vector but a vector of all years in the period.
A value to assign to the object.
Character string, the transaction class to coerce into.
Character string,
the row/column of the input objects's value data frame to use in the resulting object.
All additional data are silently dropped.
If as_transaction(..., aspect="balance_start") is being called on a loan object,
only the initial
value (and perhaps growth instead of declining values) is used,
e.g. as revenue for calculations.