Playing with R code and different packages