我怎样才能知道 R 包是何时首次在CRAN 上发布的?这个问题是相关的,但没有回答我的问题。而且我不相信该citation功能也有帮助。
使用 crandb API https://github.com/metacran/crandb
URL 调用https://crandb.r-pkg.org/MASS/all
与jq上CLI
curl https://crandb.r-pkg.org/MASS/all | jq '[.versions[]][0].Date'
#> "2009-05-06"
Run Code Online (Sandbox Code Playgroud)
或在 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"
Run Code Online (Sandbox Code Playgroud)
或在 R 中 jsonlite
jsonlite::fromJSON("https://crandb.r-pkg.org/MASS/all")$versions[[1]]$Date
#> [1] "2009-05-06"
Run Code Online (Sandbox Code Playgroud)