R: tips and tricks

R has become a very popular tool for data analysis/science over the last couple years. Here a few tips and tricks will be shared ranging from importing, preparing and analyzing data after which some prediction model can be applied to.