getnamespace: getnamespace returns the namespace for a given function

View source: R/rutils.R

getnamespaceR Documentation

getnamespace returns the namespace for a given function

Description

getnamespace searches the loaded NameSpaces and returns the name of the NameSpace or package for the input function. This is used in by 'network'. If the namespace is not loaded this will not be able to be found.

Usage

getnamespace(fun)

Arguments

fun

the name of the function of interest. It must be of class character, which can be obtained using 'getname'

Value

the name of the loaded NameSpace or package within which a function can be found.

Examples

## Not run: 
   getnamespace(getname(lm))
   getnamespace(getname(anova))

## End(Not run)

haddonm/codeutils documentation built on April 15, 2024, 1:02 p.m.