Small changes in R code