View source: R/explore_basics.R
rt_explore_plot_cohorted_adoption | R Documentation |
creates a cohorted option graph that e.g. shows the adoption/conversion rate over time (e.g. days)
rt_explore_plot_cohorted_adoption( dataset, first_date, second_date, reference_date, last_n_cohorts = 10, n_units_after_first_date = 30, units = "days", date_floor = "month", separated_colors = TRUE, y_zoom_min = NULL, y_zoom_max = NULL, include_zero_y_axis = TRUE, show_points = FALSE, show_labels = FALSE, date_break_format = NULL, base_size = 11 )
dataset |
dataframe |
first_date |
the reference date (e.g. first-touch point) |
second_date |
the date of conversion, NA if not converted |
reference_date |
we need to know how old the cohort is so we can determine if the |
last_n_cohorts |
the number of cohorts to include |
n_units_after_first_date |
'n' refers to the number of, for example, *days* of adoption from the first-touch, where 'days' is represented in the units parameter |
units |
see description for 'n_units_after_first_date' |
date_floor |
how we should define the cohort group e.g. by 'day', 'by week', by 'months' |
separated_colors |
if TRUE, returns the default color scheme that arranges sequential colors such that they are not close in color i.e. they are "separated". 'FALSE' gives a smoother gradient of colors. |
y_zoom_min |
adjust (i.e. zoom in) to the y-axis; sets the minimum y-value for the adjustment |
y_zoom_max |
adjust (i.e. zoom in) to the y-axis; sets the maximum y-value for the adjustment |
include_zero_y_axis |
expand the lower bound of the y-axis to 0 (TRUE is best practice.) |
show_points |
if TRUE adds points to the graph |
show_labels |
if TRUE adds labels to each point |
date_break_format |
format of date breaks e.g. ''%Y-%m-%d'' |
base_size |
uses ggplot's base_size parameter for controling the size of the text |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.