Geoffs hangout on the interwebs about stuff I like and do…

28Mar/13

Moving up in the ranks: from an R-Rookie to an R-Pro

R_logoI am playing with R now for little over a year. Not very intensive, but once in a while I start up R Studio and do some coding and analysis. But I am still far, far away from becoming an R-Pro. If you talk to or read some of the posts of the more seasoned R users, it seems that one of the major steps an R-Rookie can make is in using the 'apply' family of functions instead of using for-loops. It seems to be more efficient and faster. I have been trying out some of these apply functions with a lof struggles. And some of the times I jumped back to the for-loop, because I could not use them in the right manner.

Ever since it has been on my 'someday/maybe' list to develop a better understanding of these functions and document it for myself in such a manner that I understand them and can apply them in the future. So that is the quest that I am on for the next couple of weeks. During this quest I will be posting updates on this blog to share my steps and basically build a  set of tutorials about the apply functions.

I will start with the normal apply() function and then move on to lapply(), sapply(), etc. from the base R package (I still have to think about the right order though). Afterwards I will have a look at the plyr package by Hadley Wickham.

I posted a question for input on this subject on google+, Twitter and LinkedIn and I received interesting and relevant feedback on this (and confirmation that I am not the only one struggling with understanding the apply functions). See you soon on my first post about the apply() function.


Share