title: When writing my own R package, I can't seem to get other packages to import correctly
body: <p>Alright, first attempt at writing an R package and I'm stuck. Here's how I create the package:</p>
  
  <pre><code>package.skeleton("pkg",code_files=some.filenames)
  roxygenize("okg")
  </code></pre>
  
  <p>I'm using roxygen2 and have the following imports in my "pkg-package.R" file:</p>
  
  <pre><code>@import data.table zoo lubridate
  </code></pre>
  
  <p>From a terminal, I then run:</p>
  
  <pre><code>R CMD build pkg
  R CMD check pkg
  R CMD install pkg
  </code></pre>
  
  <p>During the check phase, I get the following warnings:</p>
  
  <blockquote>
    <p>** preparing package for lazy loading<br>
    Warning: replacing previous import ‘hour’ when loading ‘lubridate’<br>
    Warning: replacing previous import ‘mday’ when loading ‘lubridate’<br>
    Warning: replacing previous import ‘month’ when loading ‘lubridate’<br>
    Warning: replacing previous import ‘wday’ when loading ‘lubridate’<br>
    Warning: replacing previous import ‘week’ when loading ‘lubridate'<br>
    Warning: replacing previous import ‘yday’ when loading ‘lubridate’<br>
    Warning: replacing previous import ‘year’ when loading ‘lubridate’<br>
    ** help<br>
    <em>*</em> installing help indices<br>
    ** building package indices ...<br>
    ** testing if installed package can be loaded<br>
    Warning messages:<br>
    1: replacing previous import ‘hour’ when loading ‘lubridate’<br>
    2: replacing previous import ‘mday’ when loading ‘lubridate’<br>
    3: replacing previous import ‘month’ when loading ‘lubridate’<br>
    4: replacing previous import ‘wday’ when loading ‘lubridate’<br>
    5: replacing previous import ‘week’ when loading ‘lubridate’<br>
    6: replacing previous import ‘yday’ when loading ‘lubridate’<br>
    7: replacing previous import ‘year’ when loading ‘lubridate’  </p>
  </blockquote>
  
  <p>I'm really not sure what to make of those, but they seem like typical warnings from overwriting stuff in namespace.  In any case, I am able to install the package, but here's what happens when I try to use it:</p>
  
  <blockquote>
    <blockquote>
      <p>library(pkg)<br>
      Overriding + and - methods for POSIXt, Date and difftime<br>
      Warning messages:<br>
      1: replacing previous import ‘hour’ when loading ‘lubridate’<br>
      2: replacing previous import ‘mday’ when loading ‘lubridate’<br>
      3: replacing previous import ‘month’ when loading ‘lubridate’<br>
      4: replacing previous import ‘wday’ when loading ‘lubridate’<br>
      5: replacing previous import ‘week’ when loading ‘lubridate’<br>
      6: replacing previous import ‘yday’ when loading ‘lubridate’<br>
      7: replacing previous import ‘year’ when loading ‘lubridate’<br>
      d &lt;- my.function(arg1, arg2)<br>
      Error in MATCH(x, x) : could not find function "MATCH"</p>
    </blockquote>
  </blockquote>
  
  <p>Using traceback(), I found out that this is being generating during a call to merge.zoo().  So I tried loading zoo by hand during my R session and voila, then the function works correctly without the error message.</p>
  
  <p>I have tried changing the ordering of the imports by hand in both the "pkg-package.R" file, as well as in NAMESPACE.  Based on something I found elsewhere, I have not added any Imports or Depends to DESCRIPTION, however.  Help?</p>