Practice scripts in R