R script that takes parameters retention (vector), ARPU, and trailing days of data (integer) and estimates the lifetime value of mobile app users.