Is there a way to get a vector with the name of all functions that one could use in R?

I’d use lsf.str() as a start.

eg : x <- as.character(lsf.str("package:base")) gives you a list of all functions in the base package. You could do add all packages you want to check against. stats and utils come to mind first.

EDIT : Regarding your question about currently loaded packages :

x <- unlist(sapply(search()[-1],function(x)as.character(lsf.str(x)))) see comments

pkgs <- search()
pkgs <- pkgs[grep("package:",pkgs)]
y <- unlist(sapply(pkgs,lsf.str))

does the trick.

Leave a Comment