GSee GSee - 1 year ago 86
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

Answer Source

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)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download