#' @importFrom cyclocomp cyclocomp_package
mean_cyclocomp <- function(package, version = NULL) {
"!DEBUG Calculating cyclomatic complexity"
## It fails on some packages, e.g. BiocInstaller
cc <- tryCatch(
cyclocomp_package(package),
error = function(e) list(cyclocomp = NA)
)
mean(cc$cyclocomp)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.