вот один выстрел, основанный на различных предложениях.
packages <- available.packages()[,'Package']
ggplot(data.frame(n = nchar(packages))) +
geom_histogram(aes(n), binwidth=1)
all <- length(packages)
## 3168
up <- sum(toupper(packages) == packages)
## 262
low <- sum(tolower(packages) == packages)
## 1697
pie(c(up, low, all-up-low), labels=c("UPPERCASE","lowercase","cAmElCaSe"))
let <- sapply(sapply(letters, grep, tolower(packages)), length)
barplot(let)
length(packages[grep("2$", packages, perl=TRUE)])
# 29