Type: Package
Title: Search and Install Missing Packages
Version: 0.1.5
Author: Calli Gross
Maintainer: Calli Gross <calli@calligross.de>
Description: Search R files for not installed packages and run install.packages.
License: GPL-3
URL: https://github.com/calligross/reinstallr/
RoxygenNote: 7.1.2
Suggests: testthat
Depends: R (≥ 3.3.0)
NeedsCompilation: no
Packaged: 2021-11-27 08:41:17 UTC; mg
Repository: CRAN
Date/Publication: 2021-11-27 09:00:02 UTC

Find Files Where Specific Packages Are Used

Description

Find Files Where Specific Packages Are Used

Usage

find_used_packages(packages, path = NULL, pattern = NULL)

Arguments

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)$

Value

A data.frame with the files which are using the specified packages

Examples

## Not run: 
find_used_packages('dplyr', path = '../')

## End(Not run)

reinstallr

Description

reinstallr

Usage

reinstallr(path = NULL, pattern = NULL, ...)

Arguments

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()

Details

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

Description

Show used but not installed packages

Usage

show_missing_packages(path = NULL, pattern = NULL, ...)

Arguments

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()

Details

show_missing_packages() searches missing packages and checks if they are available on CRAN

Value

A data.frame with missing packages

Examples

## Not run: 
show_missing_packages('../')

## End(Not run)

Show Used Packages

Description

Show Used Packages

Usage

show_package_stats(path = NULL, pattern = NULL)

Arguments

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)$

Value

A aggregated data.frame

Examples

## Not run: 
show_package_stats('../')

## End(Not run)