GSee GSee - 4 months ago 28
R Question

Show names of everything in a package

Is there an easy way to list everything in a package from within R?

For example, if I type

and hit tab twice, I can see everything that's there.

How else can I get those names of objects?

ls("package:foreach", all.names=TRUE)
does not show things like


ls("package:foreach", all.names=TRUE) only shows what's attached to the search path, which only includes the objects exported from the namespace. Use ls on the results of getNamespace instead:

ls(getNamespace("foreach"), all.names=TRUE)