How can I find out which packages / libraries belong to the functions of a routine written in R?

2

I have stopped using many routines because programmers do not tell which packages / libraries the functions that are in these routines use. I know that many of these functions are authored by the programmer and are not found in any repository, but considering that most of them are in packages distributed in free repositories (CRAN, R-br, ...), it is possible to find them. Even so, searching for them is a laborious task which becomes a problem.

To get around this problem, I want to know how can I enclose one or the packages that a function belongs to?

    
asked by anonymous 25.11.2015 / 18:11

2 answers

3

You can start by trying to search the help for packages installed on your machine, for example ??"nome_da_funcao" .

However, this will only work if (i) the package is installed and (ii) the function has a help page.

Another solution is to search the documentation directly through RSiteSearch:

http://search.r-project.org/

You can also use the search directly from the command line:

RSiteSearch("nome_da_funcao")

There are auxiliary functions such as find and getAnywhere but they are even more limited because they only work if the package is loaded in the section.

The ideal is always to ask that the library commands are all specified in the script.

    
25.11.2015 / 19:09
1

Here are some alternatives:

  • It may seem obvious, but simply searching for "R function" in Google is almost always sufficient for functions of packages that are in CRAN, except functions with very simple / repeated names.

  • The link site has documentation for all packages on CRAN, and is usually where you will stop using the above method. But if it does not work, you can search the site directly.

  • If the function is related to biology, you can also search the Bioconductor site. It's also a Google destination, but it can be more useful directly.

  • 26.11.2015 / 00:00