fixed typos in the R library code