utilityFunctions: Get the search path of an environment

getSearchPathR Documentation

Get the search path of an environment

Description

Returns a list with the environments or names of the environments on the search path. These functions are used for testing, use search instead.

Usage

getSearchPath(where = parent.frame())

getSearchPathNames(where = parent.frame())

getSearchPathContent(where = parent.frame())

getSearchPathDuplicates(where = parent.frame())

Arguments

where

(environment | module | function) the object for the search path should be investigated. If we supply a list with functions (e.g. a module), the environment of the first function in that list is used.

Examples

getSearchPath()
getSearchPathNames()
getSearchPathContent()

m <- module({
  export("foo")
  import("stats", "median")
  foo <- function() "foo"
  bar <- function() "bar"
})

getSearchPathContent(m)


wahani/modules documentation built on Jan. 28, 2024, 9:14 a.m.