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

I would like to know if there is a command with which you can view all the functions built into the package R.

For example, let's say I downloaded the package on Wednesday:

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?

+6
source share
1 answer

You can use lsf.str .

For instance:

 lsf.str("package:dplyr") 

To list all objects in a package, use ls

 ls("package:dplyr") 

Please note that the package must be downloaded.

To view a list of downloadable packages, use

 search() 

Alternatively, a help call will also be executed even if the package is not loaded:

 help(package = dplyr) 

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

+11
source

Source: https://habr.com/ru/post/987725/


All Articles