Is there a command in R to view all the functions present in a package?

R

R Problem Overview


I would like to know if there is a command, using which one can view all the functions that are built into an R package.

For example, let's say I loaded a package into environment:

require(dplyr)

Now, I would like to get a list of all the functions present in the dplyr package.

Is there any way to get such a list?

R Solutions


Solution 1 - R

You can use lsf.str.

For instance:

lsf.str("package:dplyr")

To list all objects in the package use ls

ls("package:dplyr")

Note that the package must be attached.

To see the list of currently loaded packages use

search()

Alternatively calling the help would also do, even if the package is not attached:

help(package = dplyr)

Finally, you can use RStudio which provides an autocomplete function. So, for instance, typing dplyr:: in the console or while editing a file will result in a popup list of all dplyr functions/objects.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLearneRView Question on Stackoverflow
Solution 1 - RnicoView Answer on Stackoverflow