Skip to contents

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.

Usage

generate_pkgmatch_example_data()

Value

(Invisibly) The path to the temporary directory containing the package data.

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"      
#>