Skip to contents

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.

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)
} # }