[R] How to know in which package is a function

Douglas Bates bates at stat.wisc.edu
Sat Apr 23 15:53:29 CEST 2005


Romain Francois wrote:
> Hello list,
> 
> I'd like to know if there is a function that tells in which package is a 
> given function.
> Something like :
> 
> which.package("lda")
> [1] "MASS"
> 
> Thank you.
> 
> Romain
> 

Perhaps easiest is

help.search("lda")

If you know that the name is recognized in your current session (which 
means that the package is loaded) you can use

find(lda)

or

apropos(lda)

Other functions that are sometimes used in this regard are "methods" and 
"getAnywhere".




More information about the R-help mailing list