John Myles White (who did the Canabalt scores analysis from last month) was trying to decide which R functions to spend time learning, and asked the obvious followup question: Which functions in R are used the most? With no readily-available answer, John answered the question himself, by counting the number of times each function is called in all the packages available on CRAN. He then ranked the functions in two ways: first, by the total number of times each function is called in all the source code for all the packages, and then by counting the number of packages that use each function at least once. The top five functions are therefore:
- list (by the number of packages) or paste (by number of uses)
The order varies by the method used, and technically "if" and "function" are keywords, not functions. But John has helpfully provided the data in CSV format for both the package method and total uses method, so you can do your own analysis. Also interesting to note is that the occurrences table is another example of the power-law distribution in action.