Remove incorrect plot and fix R code