fixed a typo in R