# 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))
# }
Run the code above in your browser using DataLab