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 -- ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ ~~~~~~ Romain FRANCOIS - addictedtor.free.fr ~~~~~~ ~~~~ Etudiant ISUP - CS3 - Industrie et Services ~~~~ ~~ isup.cicrp.jussieu.fr ~~ ~~~~ Stagiaire INRIA Futurs - Equipe SELECT ~~~~ ~~~~~~ inria.fr/recherche/equipes/select.fr.html ~~~~~~ ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
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".
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 >> getAnywhere("lda") A single object matching 'lda' was found It was found in the following places package:MASS namespace:MASS with value function (x, ...) UseMethod("lda") <environment: namespace:MASS> Uwe Ligges
> From: Romain Francois > > 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"getAnywhere(), as Uwe suggested, will find objects that are in attached packages. help.search(), as Doug suggested, will find help topics among installed packages. To search among all CRAN (and BioC) packages, your best best is RSiteSearch("fcn", restrict="function"). The result is not shown in R, though. Andy> Thank you. > > Romain > > -- > ~~~~~~~~ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ > ~~~~~~ Romain FRANCOIS - addictedtor.free.fr > ~~~~~~ > ~~~~ Etudiant ISUP - CS3 - Industrie et Services > ~~~~ > ~~ isup.cicrp.jussieu.fr > ~~ > ~~~~ Stagiaire INRIA Futurs - Equipe SELECT > ~~~~ > ~~~~~~ inria.fr/recherche/equipes/select.fr.html > ~~~~~~ > ~~~~~~~~ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > R-project.org/posting-guide.html > > >