
Generate example data to use with pkgmatch
Source:R/example-data.R
generate_pkgmatch_example_data.Rd
This function generates a selection of test data for the "cran" corpus, to allow functions to be run offline, without having to download the large datasets otherwise required for the package to function.
Note that these data are randomly generated, and results will be generally meaningless. They are generated solely to demonstrate how the package functions, and are not intended to derive meaningful outputs.
See also
Other utils:
head.pkgmatch()
,
pkgmatch_browse()
,
pkgmatch_load_data()
,
pkgmatch_update_cache()
,
print.pkgmatch()
,
text_is_code()
Examples
generate_pkgmatch_example_data ()
#> This function resets the cache directory used by 'pkgmatch'
#> to a temporary path. To restore functionality with full data,
#> you'll either need to restart your R session, or set an
#> environment variable named 'PKGMATCH_CACHE_DIR' to the
#> desired path. Default path is /github/home/.cache/R/pkgmatch
input <- "curl" # Name of a single installed package
pkgmatch_similar_pkgs (input, corpus = "cran")
#> $text
#> [1] "crul" "AmpGram" "CancerGram" "httr2" "mRpostman"
#>
#> $code
#> [1] "AmpGram" "mRpostman" "RCurl" "CancerGram" "crul"
#>