Description Usage Arguments Value Author(s) Examples
It calculates the accounting matrix by counts given date and subscription data. It only returns one row for each date, i.e. it will sum up all the products.
1 |
datall_revenue |
subscription data, need to have columns: user_id, Product, Effective_Start, Effective_End, MRR |
type |
product type |
dates |
a date vector (have to be date type) |
A revenue accounting matrix by count is returned for each date.
Hui Lin, longqiman@gmail.com
1 2 3 4 5 6 7 8 9 | ## 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)
{NetlifyDS::mrrAtDateType(time_point, subs = base_monthly, type = NULL)})
growth_matrix_identity = RevCntAct(datall_revenue = total_revenue, 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.