attach_package: Organise temporarily needed packages

Description Usage Arguments Details Value Functions Author(s)

View source: R/HLP_attach_packages.R

Description

Attach required packages which may be detached after function run.

Usage

1
2
3
attach_package(pkg.cran = NULL, pkg.bioc = NULL, update_bioc_pkgs = F)

detach_package(pkg)

Arguments

pkg.cran

Character vector with names of CRAN packages to attach

pkg.bioc

Character vector with names of Bioconductor packages to attach

update_bioc_pkgs

logical. When FALSE, BiocManager::install() does not attempt to update old packages. When TRUE, update old packages according to ask.

pkg

Character vector with names of packages to be detached

Details

Help functions to organise package loading. Some functions require huge annotation packages which shall not be loaded for the full session. The function attach_package attaches these packages for an individual function run and installes them from CRAN and/or Bioconductor if necessary. detach_package can be used to detach these packages after function run. DLLs of unloaded packages are removed as well.

Value

character vector with package names which have not yet been attached to workspace before call of attach_package. This vector may be used to detach packages not needed any more with detach_package. detach_package invisibly returns the set of identified stray DLLs reported by R.utils::gcDLLs.

Functions

Author(s)

Frank Ruehle


frankRuehle/systemsbio documentation built on Sept. 14, 2020, 1:18 a.m.