r-hub / cranlogs

Download Logs from the RStudio CRAN Mirror
https://r-hub.github.io/cranlogs/
Other
80 stars 13 forks source link

Default "from" to the CRAN release date #51

Closed ikashnitsky closed 4 years ago

ikashnitsky commented 4 years ago

Quite often one would like to see the whole history of package downloads. The information on initial releases is available here https://cran.r-project.org/web/packages/available_packages_by_date.html Maybe there is a cheap way to wrap and lookup this table?

gaborcsardi commented 4 years ago

You can easily write a wrapper with pkgsearch, you can get the date of the last release like this:

tail(pkgsearch::cran_package_history("igraph")$date, 1)
ikashnitsky commented 4 years ago

Great! In this case the date of the first release would be more interesting, I think

head(pkgsearch::cran_package_history("igraph")$date, 1)

Don't you think the initial release would be a meaningful from default for cranlogs::cran_downloads?

gaborcsardi commented 4 years ago

Why would you have downloads before the first release?

ikashnitsky commented 4 years ago
head(pkgsearch::cran_package_history("igraph")$date, 1)

gives the first date the package appears on CRAN

ikashnitsky commented 4 years ago

So, You don't think that would be a nice starting default? (the whole CRAN history of a package)

gaborcsardi commented 4 years ago

We can't just change the default values, because that is not backward compatible. You can always put in from = "1980-01-01" to get all downloads for a package.

ikashnitsky commented 4 years ago

I see. Thanks for taking care to explain