Skip to contents

Main functions

pkgmatch_similar_fns()
Identify R functions best matching a given input string
pkgmatch_similar_pkgs()
Find R packages matching an input of either text or another package

BM25 functions

pkgmatch_bm25()
Calculate the "BM25" = "Best Matching 25" ranking function between text input and all R packages within specified corpus.
pkgmatch_bm25_fn_calls()
Calculate a "BM25" index from function-call frequencies between a local R package and all packages in specified corpus.

Embeddings functions

pkgmatch_embeddings_from_pkgs()
Return raw language model ('LM') embeddings from package text and function definitions.
pkgmatch_embeddings_from_text()
Return raw language model ('LM') embeddings from a vector of text strings.

Treesitter functions

pkgmatch_treesitter_fn_tags()
Use "treesitter" to tag all function calls made within local package, and to associate those calls with package namespaces. This is used as input to the pkgmatch_bm25_fn_calls function.

Ollama functions

ollama_check()
Check that ollama is installed with required models, and download if not.

Utility functions

head(<pkgmatch>)
Head method for 'pkgmatch' objects
pkgmatch_browse()
Open web pages for pkgmatch results
pkgmatch_load_data()
Load embeddings generated by the pkgmatch_embeddings_from_pkgs function, either for all rOpenSci packages or, if fns = TRUE, all individual functions within those packages.
print(<pkgmatch>)
Print method for 'pkgmatch' objects
text_is_code()
Estimate whether input text string is code or English prose text.

Data update functions

pkgmatch_update_data()
Update pkgmatch` data for both CRAN and rOpenSci packages on GitHub release