cran checks API: an update

Authors: Scott Chamberlain

If you have an R package on CRAN, you probably know about CRAN checks. Each package on CRAN, that is not archived on CRAN, has a checks page, like this one for ropenaq:


The table above is results of running R CMD CHECK on the package on a combination of different operating systems, R versions and compilers. CRAN maintainers presumably use these as a basis for getting in touch with maintainers when these checks are failing.

Read the rest at

1 Like

I am finding this a very useful tool however I am having an issue with the /history/:date route.
The example you use above works as expected however there appears to be a large number of dates that are returning an error, for example:
x <- jsonlite::stream_in(curl::curl(“”))


opening curl input connection.
Error in FUN(X[[i]], …) : invalid multibyte string, element 1
closing curl input connection.

Any advice would be appreciated!

1 Like

Thanks for your question! I can replicate the problem you show. I am not sure what exactly is going wrong there, but the below seems to work, first downloading the file, then streaming the file in. Seems best to first download, then read in, probably want to replace file paths with non-temporary file paths if you want to keep files after the R session ends.

Let me know if this helps.

checks_download <- function(x) {
  url_base <- ""
  path <- file.path(tempdir(), paste0(x, ".json.gz"))
  curl::curl_download(file.path(url_base, x),
    destfile = path)

checks_read <- function(x) {

dates <- seq(as.Date("2019-10-01"), as.Date("2019-10-31"), by = "day")
paths <- lapply(dates, checks_download)
df <- dplyr::bind_rows(lapply(paths, checks_read))
1 Like

Thank you for the quick response, that worked brilliantly!