pff_find_and_install_pkgs: Finds and installs packages used in R related files

Description Usage Arguments Value Examples

View source: R/pff_find_install_pkgs.R

Description

This function will search for all R related files in input folder.in and find loaded packages with the library() and require() functions.

Usage

1
2
3
pff_find_and_install_pkgs(folder.in, do.recursive = TRUE,
  my.library.path = .libPaths()[1],
  my.repository = "https://cloud.r-project.org")

Arguments

folder.in

Folder to search for R related files

do.recursive

Find files in all subdirectories? (default = TRUE)

my.library.path

Library to search for installed packages (default = .libPaths()[1])

my.repository

Url of CRAN repository (default = "https://cloud.r-project.org" )

Value

Messages in prompt and dataframe with the results

Examples

1
2
3
4
5
6
## Not run: 
my.dir <- dirname(system.file('extdata/Example_Script_1.R', package = 'PkgsFromFiles'))
df.out <- pff_find_and_install_pkgs(folder.in = my.dir)
print(df.out)

## End(Not run)

PkgsFromFiles documentation built on Oct. 29, 2018, 1:03 a.m.