(This article was first published on

**BioStatMatt » R**, and kindly contributed to R-bloggers)Thanks to Anthony Damico who alerted me to an error in the Bank of America's 1% cash rewards figure in my last post. The plot shows the true reward percentage as a function of purchase amount. A key "feature" of the BoA reward program is that the full 1% is only awarded for purchases in whole dollar amounts. But, in the figure I neglected to plot the function at each whole dollar amount. Hence, the function was a bit misleading. Anthony sent the code below that corrects this; the figure is below.

x <- seq(1,100,length.out=9901) plot(x, trunc(x)/x, type="l", xlab="Purchase Amount ($)", ylab="BoA Cash Reward (%)") abline(h=1, lty=2)

To

**leave a comment**for the author, please follow the link and comment on his blog:**BioStatMatt » R**.R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...