Moment Generating Functions in R