plot.retention {RMixpanel} | R Documentation |
Plot Retention Rates
Description
Plot Retention Rates as a line chart. Multiple chart types are available.
Usage
## S3 method for class 'retention'
plot(x, type="all", percentages=TRUE, omitLast=TRUE,
colors, durations, y, ...)
Arguments
x |
Object of class |
type |
Character vector. If "all", all chart types are plotted. Valid values are |
percentages |
Use retention counts or percentages? Default is |
omitLast |
Omit last value per series? Useful for Mixpanel data, because last value is usually based on partial data! |
colors |
Colors for lines. Optional. |
durations |
Selected Durations (index). Default is c(1, 2, 5, 10). |
y |
Not used. |
... |
Not used. |
Author(s)
Meinhard Ploner
References
https://mixpanel.com/help/reference/data-export-api#retention
See Also
Examples
## Not run:
## Fill in here the API token, key and secret as found on
## www.mixpanel.com - Account -> Projects.
account = mixpanelCreateAccount("ProjectName",
token="c12g3...",
secret="168e7e...",
key="543c55...")
ret = mixpanelGetRetention(account, born_event="AppInstall", event="WatchedItem",
from=20150701, to=20151101, unit="week")
par(mfrow=c(2, 2))
plot(ret, type="all")
par(mfrow=c(1, 1))
## End(Not run)
[Package RMixpanel version 0.7-1 Index]