ropensci-review-tools / pkgstats

Historical statistics of every R package ever
https://docs.ropensci.org/pkgstats/
17 stars 1 forks source link

Fix language identification #42

Closed mpadge closed 2 years ago

mpadge commented 2 years ago
x <- readRDS ("pkgstats-CRAN-all.Rds")
lang <- unlist (strsplit (x$languages, ",\\s"))
table (lang)
#> lang
#>      C    C++  CMake   CUDA     NA Python 
#>  18930  17911     22    103    664    277

Created on 2022-04-14 by the reprex package (v2.0.1)

That's not right.

mpadge commented 2 years ago
library (pkgstats)
tarballs <- list.files ("/<path>/<to>/cran/tarballs",
                        pattern = "\\.tar\\.gz$",
                        full.names = TRUE)
tarballs <- grep ("RxODE|odrust|mapdeck", tarballs, value = TRUE)
for (i in tarballs) {
    s <- pkgstats (i)
    message (basename (i), ": ", pkgstats_summary (s)$languages)
}
#> mapdeck_0.3.4.tar.gz: C++, C/C++ Header
#> odrust_0.0.0.9000.tar.gz: C, Rust, TOML
#> RxODE_1.0.8.tar.gz: C, C++, Fortran

Created on 2022-04-14 by the reprex package (v2.0.1)