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

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?


Solution 1:

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.