How do people learn about giving an R package a namespace? I find the documention in “R Extensions” fine, but I don’t really get what is happening when a variable is imported or exported – I need a dummy’s guide to these directives.
How do you decide what is exported? Is it just everything that really shouldn’t required the pkg:::var syntax? What about imports?
Do imports make it easier to ensure that your use of other package functions doesn’t get confused when function names overlap?
Are there special considerations for S4 classes?
Packages that I’m familiar with that use namespaces such as sp and rgdal are quite complicated – are there simple examples that could make things clearer?
I have a start on an answer on the devtools wiki: https://r-pkgs.org/Metadata.html