Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find out when an R package was first released on CRAN?

Tags:

r

How can I find out when an R package was first released on CRAN? This question is related, but does not answer my question. And I don't believe the citation function helps either.

like image 798
Samuel Avatar asked Jan 03 '23 01:01

Samuel


1 Answers

Use the crandb API https://github.com/metacran/crandb

URL call https://crandb.r-pkg.org/MASS/all

with jq on the CLI

curl https://crandb.r-pkg.org/MASS/all | jq '[.versions[]][0].Date'
#> "2009-05-06"

OR in R

library(jqr)
curl::curl_download( 'https://crandb.r-pkg.org/MASS/all', (f <- tempfile()))
jq(paste0(readLines(f), collapse=""), "[.versions[]][0].Date")
#> "2009-05-06"

OR in R with jsonlite

jsonlite::fromJSON("https://crandb.r-pkg.org/MASS/all")$versions[[1]]$Date
#> [1] "2009-05-06"
like image 92
sckott Avatar answered Jan 05 '23 16:01

sckott