| Title: | Search and Install Missing Packages |
|---|---|
| Description: | Search R files for not installed packages and run install.packages. |
| Authors: | Calli Gross |
| Maintainer: | Calli Gross <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.4 |
| Built: | 2026-05-28 09:23:33 UTC |
| Source: | https://github.com/calligross/reinstallr |
Find Files Where Specific Packages Are Used
find_used_packages(packages, path = NULL, pattern = NULL)find_used_packages(packages, path = NULL, pattern = NULL)
packages |
Vector of packages to look for |
path |
Directory which is scanned recursively. Default is the working directory. |
pattern |
Regex to identify R source files. Default is .*\.(R|r|Rnw|Rhtml|Rpres|Rmd)$ |
A data.frame with the files which are using the specified packages
## Not run: find_used_packages('dplyr', path = '../') ## End(Not run)## Not run: find_used_packages('dplyr', path = '../') ## End(Not run)
reinstallr
reinstallr(path = NULL, pattern = NULL, ...)reinstallr(path = NULL, pattern = NULL, ...)
path |
Directory which is scanned recursively. Default is the working directory. |
pattern |
Regex to identify R source files. Default is .*\.(R|r|Rnw|Rhtml|Rpres|Rmd)$ |
... |
Parameters passed to install.packages() |
reinstallr() scans all R source files in the path specified by the path parameter and matching the pattern regex.
reinstallr looks for library(package), require(package) and package::function
Show used but not installed packages
show_missing_packages(path = NULL, pattern = NULL, ...)show_missing_packages(path = NULL, pattern = NULL, ...)
path |
Directory which is scanned recursively. Default is the working directory. |
pattern |
Regex to identify R source files. Default is .*\.(R|r|Rnw|Rhtml|Rpres|Rmd)$ |
... |
Parameters passed to available.packages() |
show_missing_packages() searches missing packages and checks if they are available on CRAN
A data.frame with missing packages
## Not run: show_missing_packages('../') ## End(Not run)## Not run: show_missing_packages('../') ## End(Not run)
Show Used Packages
show_package_stats(path = NULL, pattern = NULL)show_package_stats(path = NULL, pattern = NULL)
path |
Directory which is scanned recursively. Default is the working directory. |
pattern |
Regex to identify R source files. Default is .*\.(R|r|Rnw|Rhtml|Rpres|Rmd)$ |
A aggregated data.frame
## Not run: show_package_stats('../') ## End(Not run)## Not run: show_package_stats('../') ## End(Not run)