Show names of everything in a package

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)

Leave a Comment