This R code is an example of predictive modeling using NBD/Pareto for email churn prediction. You can find the whole analysis here:
I have used R version 3.3.3 (2017-03-06) -- "Another Canoe"
All packages needed are mentioned in the code.
You just need to import the data as a .csv file, install the required packages and run the code!
The MIT License