Description Usage Arguments Details Examples
Gather CRAN details
1 2 3 4 5 | gather_cran(pkg)
gather_crans(pkg)
cran_first_date(x)
|
pkg |
(character) a package name |
x |
a data.frame |
While gather_commits
and gather_downloads
cache
data because data can take a long time to download, this function shouldn't take that
long, even with hundreds of of pkgs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
library("rostats")
library("ropkgs")
library("dplyr")
url <- "https://raw.githubusercontent.com/ropensci/roregistry/gh-pages/registry.json"
df <- jsonlite::fromJSON(url)
(pkgs <- tbl_df(df$packages) %>%
filter(on_cran | on_bioc) %>%
.$name)
sort(pkgs)
# get first date on CRAN for each pkg
res <- gather_crans(pkgs)
alldat <- dplyr::bind_rows(res)
# get new packages on CRAN, arranged by date
alldat %>% cran_first_date() %>% arrange(desc(date)) %>% top_n(10) %>%
readr::write_csv("../biweekly/data/newpkgs.csv")
# get new packages & new versions on CRAN, arranged by date
alldat %>% arrange(desc(date)) %>% filter(date > '2019-04-14') %>% top_n(30) %>%
readr::write_csv("../biweekly/data/newversions.csv")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.