title: Namespaces in R packages
body: <p>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. </p>
  
  <p>How do you decide what is exported? Is it just everything that really shouldn't required the pkg:::var syntax? What about imports? </p>
  
  <p>Do imports make it easier to ensure that your use of other package functions doesn't get confused when function names overlap? </p>
  
  <p>Are there special considerations for S4 classes? </p>
  
  <p>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? </p>