Site icon R-bloggers

R Function Usage Frequencies, Take 2

[This article was first published on John Myles White: Die Sudelbücher » Statistics, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Yesterday, Hadley Wickham commented on my post on the frequency of calling various R functions that it would be helpful to have the number of packages that call a function in addition to the number of times that the function is called. I compiled the relevant data last night: you can grab it here This data set includes a row for every function I found, indexed by each of the packages and files in which it was used. At this higher level of resolution, I record the number of times each function was called.

To get a sense of the correspondence between these measures, below I’ve plotted the number of packages using each function in my data set against the log number of times each function is called:

And here’s a new top 25 most called functions table:

Function Packages Using Function
function 1903
if 1846
c 1795
length 1791
list 1679
for 1656
return 1559
stop 1538
paste 1526
rep 1512
matrix 1419
is.null 1413
sum 1396
max 1368
cat 1308
names 1297
is.na 1241
min 1216
cbind 1175
nrow 1158
sqrt 1157
t 1134
print 1120
class 1120
seq 1098

To leave a comment for the author, please follow the link and comment on their blog: John Myles White: Die Sudelbücher » Statistics.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.