Skip to contents

Calculate a "BM25" index from function-call frequencies between a local R package and all packages in specified corpus.

Usage

pkgmatch_bm25_fn_calls(path, corpus = "ropensci")

Arguments

path

Local path to source code of an R package.

corpus

One of "ropensci" or "cran"

Value

A data.frame of two columns:

  • "package" Naming the package from the specified corpus;

  • bm25 The "BM25" index value for the nominated packages, where high values indicate greater overlap in term frequencies.

See also

Other bm25: pkgmatch_bm25()

Examples

if (FALSE) { # \dontrun{
u <- "https://cran.r-project.org/src/contrib/odbc_1.5.0.tar.gz"
path <- file.path (tempdir (), basename (u))
download.file (u, destfile = path)
bm25 <- pkgmatch_bm25_fn_calls (path)
} # }