get_revenue {businessPlanR} | R Documentation |
Getter/setter methods for businessPlanR objects
Description
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
.
Usage
get_revenue(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year"),
only_type,
not_type
)
## S4 method for signature '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 signature '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 signature 'transaction_plan'
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
## S4 method for signature 'loan'
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
## S4 method for signature 'depreciation'
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
## S4 method for signature 'revenue'
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
## S4 method for signature 'expense'
get_value(
obj,
drop_nonyear_cols = FALSE,
resolution = c("month", "quarter", "year")
)
get_loans(obj, as_data_frame = TRUE)
## S4 method for signature 'operations'
get_loans(obj, as_data_frame = TRUE)
get_plan(obj, type, category, name, valid_types = "default")
## S4 method for signature 'transaction_plan'
get_plan(obj, type, category, name, valid_types = "default")
get_period(obj, years = FALSE)
## S4 method for signature 'operations'
get_period(obj, years = FALSE)
## S4 method for signature 'transaction_plan'
get_period(obj, years = FALSE)
## S4 method for signature 'loan'
get_period(obj, years = FALSE)
## S4 method for signature 'depreciation'
get_period(obj, years = FALSE)
get_depreciation_plan(obj, as_data_frame = TRUE)
## S4 method for signature 'operations'
get_depreciation_plan(obj, as_data_frame = TRUE)
get_plan_type(obj)
## S4 method for signature 'transaction_plan'
get_plan_type(obj)
get_misc(obj, name)
## S4 method for signature 'operations'
get_misc(obj, name)
set_misc(obj, name) <- value
## S4 replacement method for signature 'operations'
set_misc(obj, name) <- value
list_plans(obj)
## S4 method for signature 'transaction_plan'
list_plans(obj)
get_sum(obj)
## S4 method for signature 'revenue'
get_sum(obj)
## S4 method for signature 'expense'
get_sum(obj)
as_transaction(obj, to, aspect, valid_types = "default", type)
## S4 method for signature '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 signature 'depreciation'
as_transaction(
obj,
to = c("revenue", "expense"),
aspect = c("investment", "depreciation", "value"),
valid_types = "default",
type
)
Arguments
obj |
An object of class
|
drop_nonyear_cols |
Logical, whether to drop or keep columns specifying type, category or name or rows. |
resolution |
One of |
only_type |
Optional character vector, if given,
only rows with matching type are returned.
Overrides |
not_type |
Optional character vector, if given, only rows with types not matching the vector entries are returned. |
as_data_frame |
Logical,
if |
type |
Character string, a valid type name for the resulting object. |
category |
A character string, custom category for this transaction. |
name |
Character or integer, specifying which element to get/set. If missing, the whole list is returned/replaced. |
valid_types |
A character string, the model types defined by
|
years |
Logical,
if |
value |
A value to assign to the object. |
to |
Character string, the transaction class to coerce into. |
aspect |
Character string,
the row/column of the input objects's |
Details
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.
Value
Depending on the method, either a data frame or a numeric value.