revenue,-class {businessPlanR} | R Documentation |
S4 Class revenue
Description
This is a special case of the generic class transaction
.
Usage
## S4 method for signature 'revenue'
initialize(
.Object,
type,
category,
name,
per_use,
missing = c("rep", "interpol", "0"),
due_month = NA,
valid_types = "default",
...,
.list = list()
)
Arguments
.Object |
The object to initialize. |
type |
A character string defining the type of transaction as defined by |
category |
A character string, custom category for this transaction. |
name |
A character string, custom name or ID for this transaction. |
per_use |
If given, the numbers provided via |
missing |
One of |
due_month |
Character vector to define months where transactions are due. This argument
causes previous amounts to be cumulated and thereby postponed to the given month of a year.
Combined with e.g. |
valid_types |
A character string, the model types defined by
|
... |
Numeric values named in |
.list |
An alternative to |
Slots
type
A character string, for valid values see
valid_types
.category
A character string, custom category for this revenue.
name
A character string, custom name or ID for this revenue.
value
Data frame containing all revenues, each month in a column named
YYYY.MM
.valid_types
A character string, the model types defined by
set_types
to be used for validation.
Constructor function
Should you need to manually generate objects of this class, the constructor function
revenue(...)
can be used instead of
new("revenue", ...)
.
Examples
rev_2019_2021 <- revenue(
type="Sale",
category="Merch",
name="T-Shirts",
"2019.03"=100,
"2019.08"=267,
"2020.03"=344,
"2020.09"=549,
"2021.02"=770,
"2021.07"=1022,
"2021.10"=1263
)