The main pkgmatch function, pkgmatch_similar_pkgs,
returns data.frame objects of class "pkgmatch". This class exists
primarily to enable this print method, which summarises by default the top 5
matching packages or functions. Objects can be converted to standard
data.frames with as.data.frame().
Usage
# S3 method for class 'pkgmatch'
print(x, ...)Value
The result of printing x, in form of either a single character
vector, or a named list of character vectors.
Examples
corpus <- "cran"
generate_pkgmatch_example_data (corpus = corpus)
input <- "Download open spatial data from NASA"
p <- pkgmatch_similar_pkgs (input, corpus = corpus)
head (p) # Shows first 5 rows of full `data.frame` object
#> package version rank
#> 1 crul 1.5.0 1
#> 2 ssh 0.9.3 2
#> 3 httr 1.4.7 3
#> 4 RCurl 1.98 4
#> 5 mRpostman 1.1.4 5
p # Default print method, lists 5 best matching packages
#> [1] "crul" "ssh" "httr" "RCurl" "mRpostman"
