Skip to content

Instantly share code, notes, and snippets.

@goldingn
Created September 28, 2017 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goldingn/ded9cbe38e8cb4ae5745ac2582299fb6 to your computer and use it in GitHub Desktop.
Save goldingn/ded9cbe38e8cb4ae5745ac2582299fb6 to your computer and use it in GitHub Desktop.
how many R packages on CRAN mention ecology or evolution in their descriptions?
devtools::install_github("RhoInc/CRANsearcher")
pkg <- CRANsearcher:::getPackages()
strings <- paste(pkg[, "Title"], pkg[, "Description"])
idx <- grep(" ecolog*| evolut*", strings, ignore.case = TRUE)
length(idx)
# [1] 236
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment