learning basic R code