library(tidyverse) | |
library(stringr) | |
library(stringi) | |
simplify_name <- function(n) | |
## Extract just the name, removing any quotes, and normalize accented characters | |
stri_trans_general(str_trim(str_match(n,"^[\'\"]?([^\'\",(<]+).*<")[,2]),"latin-ascii") | |
pkglist <- tools::CRAN_package_db() | |
pkglist <- tbl_df(pkglist[-40]) ## remove duplicate MD5sum column | |
pkglist %>% | |
select(Maintainer, Author, Package) %>% | |
arrange(Maintainer) -> authors | |
authors %>% | |
transmute(Maint = simplify_name(Maintainer)) %>% | |
group_by(Maint) %>% | |
tally %>% arrange(desc(n)) -> topauthors | |
as.data.frame(head(topauthors,20)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment