Description Usage Arguments Value Author(s) Examples
It calculates the accounting matrix given date and daily revenue data. It only returns one row for each date, i.e. it will sum up all the products.
1 |
datall_revenue |
daily revenue data, need to have columns: user_id, Product, active_date, MRR |
type |
product type |
dates |
a date vector (have to be date type) |
A revenue accounting matrix is returned for each date.
Hui Lin, longqiman@gmail.com
1 2 3 4 5 6 7 8 | ## Not run:
dates <- seq(as.Date("2018-02-01"), lubridate::ceiling_date(Sys.Date(), unit = "month"), "months") - days(1)
dates
# need to get daily revenue from subscription data if you don't have that already
base_monthly = do.call("rbind", lapply(dates, function(time_point)
growth_matrix_identity = RevAct(datall_revenue = base_monthly, type = c("Identity"), dates = dates)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.