In one of my packages, fgeo, I'm trying to write a function to list all functions and datasets in itself (fgeo). For that I first need to add fgeo on the search list. I know I'm supposed to avoid calling library() in functions of my packages but in this particular situation I can't think of an alternative.
You don't need to attach your package to list the functions exported from it. getNamespaceExports() from the base package will return all exported functions / datasets from a given namespace. e.g.
It's not a single call, but if you use data(package = "fgeo"), you'll be given info about all the datasets in the fgeo package. If printed, this shows a nicely-formatted page in a new window. But if you assign the output to an object, you can examine it. The results element of that list is a character matrix with all the info you'll need: