Your question, or the general pattern anyway, was clearly a primary use case for the design of the sos package.
sos actually goes one step further that your question requires by identifying particular functions with packages; in addition, it ranks the results by relevance (by default, you can change the default behavior via the "sortby" parameter, e.g., sortby="Date")
Here's how it works:
most of this package's functionality is exposed via the "findFn" command
for instance, if you want a list of all functions and the parent package related to scatter plots:
findFn("scatter plot", maxPages=2, sortby="TotalScore")
This returns a dataframe formatted as HTML table and delivered in your default browser (if you don't want it to pop-up immediately, then just bind the function call to a variable and then call the variable when you're ready)
The right-most column of the dataframe/HTML page is "Description and Link". Clicking an entry in that column opens another tab in your browser (according to the user-set preferences set in your browser) with the complete R help page for that function.
The results from the function call above show, for instance, that the functions for plotting data in a 'scatter plot' format are found in the following packages:
- ade4 (function: scatter)
- IDPmisc (functions: ipairs, iplots)
- GGally (function: ggally_points)
- PerformanceAnalytics (function:
chart.Scatter)
- mclust (function: clPairs)
Another example:
findFn("boxplot", maxPages=2, sortby="TotalScore")
identifies these (among others) packages/functions for plotting boxplots:
- sfsmisc (function: boxplot.matrix)
- aplpack (function: boxplot2D)
- NADA (function: boxplot-methods)
- StatDA (function: rg.boxplot)
- plotrix (function: gap.boxplot)
- gplots (function: boxplot.n)
- multcompView (function:
multcompBoxplot)
- oligo (function: boxplot)