View source: R/plot.CohortRetention.R
Plots the results of cohortRetention
using ggplot2
.
1 2 3 4 5 6 7 | ## S3 method for class 'CohortRetention'
plot(cohortRetention, labelPoints = FALSE,
textsize = 3, reverse = TRUE, title = "Cohort Based Retention",
xlab = "Cohort", ylab1 = "Percentage", ylab2 = "Cohort Size",
legend.position = c(0.1, 0.7), legend.justification = "left",
retentionMonths = c(15), completionMonths = c(36, 48, 72, 96),
plot.histogram = TRUE, useGridExtra = TRUE, ...)
|
cohortRetention |
the results from |
labelPoints |
if TRUE, points will be labeled. |
textsize |
the size of the text. |
reverse |
if TRUE, the x-axis is reversed so most recent cohort is on the left. |
title |
the plot title. |
xlab |
the x-axis title. |
ylab2 |
the y-axis title for the histogram of cohort sizes. |
ylab1 |
the y-axis title for the rates. |
legend.position |
the placement for the legend. |
legend.justification |
the legend justification. |
retentionMonths |
the months to label for the retention rates. |
completionMonths |
the months to label for completion rates. |
plot.histogram |
if TRUE, a histogram will be included representing cohort sizes. |
useGridExtra |
if TRUE, layout options from the |
... |
currently unused. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.