How to find all functions in an R package?

Viewed 5021

What is the best way to find all the functions associated in a package?? I am currently going through the caTools package. If I do ?caTools or ??caTools I am simply going to get search for functions called that but not the functions in the package. Is there an easy way to access all the functions in the R gui? Are there any good ways to search for functions?

6 Answers

Another way is to use collidr package

library(collidr)
library(dplyr)

collidr::CRANdf %>% 
  filter(package_names  == "caTools")

#    package_names     function_names
# 1        caTools    caTools-package
# 2        caTools       base64encode
# 3        caTools       base64decode
# 4        caTools             colAUC
# 5        caTools              combs
# 6        caTools         LogitBoost
# 7        caTools predict.LogitBoost
# 8        caTools          read.ENVI
# 9        caTools         write.ENVI
# 10       caTools           read.gif
# 11       caTools          write.gif
# 12       caTools             runmad
# 13       caTools            runmean
# 14       caTools             runmin
# 15       caTools             runmax
# 16       caTools        runquantile
# 17       caTools              runsd
# 18       caTools       sample.split
# 19       caTools          sumexact,
# 20       caTools        cumsumexact
# 21       caTools              trapz

Just figured that if you just go to Environment tab -> click Global Environment -> click the package you want to see (I selected dplyr here for demonstration but in your case it will be caTools), all functions, values and data will be displayed.

enter image description here

enter image description here

Related