Skip to contents

This function gets R packages based on a keyword in their description.

Usage

find_packages(keyword)

Arguments

keyword

character, the keyword to search package descriptions for.

Value

character vector of matching package names or NULL if no matches.

Note

the function in its current form only searches available.packages()

Examples

# \donttest{
# find the list of R packages for data or machine learning

matched_pkgs <- suppressWarnings(find_packages("plotting"))
matched_pkgs
#>  [1] "ape"           "coda"          "colorspace"    "fields"       
#>  [5] "GGally"        "ggfortify"     "gplots"        "gstat"        
#>  [9] "hexbin"        "latex2exp"     "MALDIquant"    "manipulate"   
#> [13] "plotcli"       "shape"         "sp"            "spacetime"    
#> [17] "spatstat.geom" "stars"         "weights"       "wordcloud"    

matched_pkgs <- suppressWarnings(find_packages("machine learning"))
matched_pkgs
#>  [1] "autokeras"  "binr"       "card.pro"   "data.tree"  "kernlab"   
#>  [6] "openNLP"    "psych"      "scientific" "simrel"     "tensorflow"
#> [11] "terra"     
# }