Fit a CART classification model on the ISLR Carseats data with the rpart package in R, and tune the pruning parameter with the caret package.
Add overall and per-user average columns to an R data frame with base, plyr, dplyr and data.table, and time how long each of the five approaches takes.
Replace for-loops in R with the apply family of functions and the plyr package, using two worked examples that make the code shorter and easier to debug.
Two short R examples: summarise a data frame by group, and a quick way to run a simulation.
Produce gross returns, standard deviation and correlation for several shares in R by reading and combining multiple downloaded stock price files.
Download stock price data from Google in R and merge it into one data frame in memory, avoiding the slower route of saving each file to a local drive.
Download stock price files in R, save them to a local folder and merge them into one data frame. The Google endpoint the script used has since been retired.