Fixed typos, added plain R script