Calculate a "BM25" index from function-call frequencies between a local R package and all packages in specified corpus.
Source:R/bm25.R
pkgmatch_bm25_fn_calls.Rd
Note that the results of this function are entirely different from
pkgmatch_bm25 with corpus = "ropensci-fns"
. The latter returns BM25
values from text descriptions of all functions in all rOpenSci packages,
whereas this function returns BM25 values based on frequencies of function
calls within packages.
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)
} # }