Count lines of code (etc) from source packages on CRAN

cloc_cran(
  pkgs,
  repos = getOption("repos"),
  contrib_url = utils::contrib.url(repos, "source"),
  .progress = interactive()
)

Arguments

pkgs

names of packages

repos

character vector, the base URL(s) of the repositories to use, i.e., the URL of the CRAN master such as "https://cran.r-project.org" or its Statlib mirror, "http://lib.stat.cmu.edu/R/CRAN".

contrib_url

URL(s) of the contrib sections of the repositories. Use this argument only if your repository mirror is incomplete, e.g., because you burned only the ‘contrib’ section on a CD. Overrides argument repos.

.progress

show a progress bar? Default: TRUE if running interactively.

Value

data frame (tibble)

Examples

# requires a network connection therefore is set for you to run it manually
if (FALSE) {
cloc_cran(c("archdata", "hrbrthemes", "iptools", "dplyr"))
}