title: "object not found" during package build/install
body: <p>I'm at a loss to debug building/installing a package. Building a package "MyProjekt" through</p>
  
  <pre><code>&gt; devtools::build("MyProjekt")
  </code></pre>
  
  <p>works fine, even though</p>
  
  <pre><code>&gt; devtools::document()
  Updating MyProjekt documentation
  Loading MyProjekt
  Error: object 'rank' not found whilst loading namespace 'MyProjekt'
  </code></pre>
  
  <p>fails.</p>
  
  <p>Attempting to install the built (pure R) package</p>
  
  <pre><code>&gt; install.packages(pkgs="./MyProjekt.tar.gz")
  ...
  Error: package or namespace load failed for 'MyProjekt':
   object 'rank' not found whilst loading namespace 'MyProjekt'
  Error: loading failed
  Execution halted
  ...
  ERROR: loading failed for 'i386', 'x64'
  </code></pre>
  
  <p>also fails.</p>
  
  <p>Unfortunately the term 'rank' is a common term in my domain and I have hundreds of hits when searching in my files for that term.</p>
  
  <p>How might I start a systematic way to hunt this bug down?</p>