Learn R Programming

SpaDES.core (version 2.0.5)

.modifySearchPath: Modify package order in search path

Description

Intended for internal use only. It modifies the search path (i.e., search()) such that the packages required by the current module are placed first in the search path. Note, several "core" packages are not touched; or more specifically, they will remain in the search path, but may move down if packages are rearranged. The current set of these core packages used by SpaDES can be found here: SpaDES.core:::.corePackages

Usage

.modifySearchPath(
  pkgs,
  removeOthers = FALSE,
  skipNamespacing = !getOption("spades.switchPkgNamespaces")
)

Value

Nothing. This is used for its side effects, which are "severe".

Arguments

pkgs

The packages that are to be placed at the beginning of the search path,

removeOthers

Logical. If TRUE, then only the packages in c(pkgs, SpaDES.core:::.corePackages) will remain in the search path, i.e., all others will be removed.

skipNamespacing

Logical. If FALSE, then the running of an event in a module will not trigger a rearrangement of the search() path. This will generally speed up module simulations, but may create name conflicts between packages.

Author

Eliot McIntire