title: Best Practices for Roxygen Imports/Depends?
body: <p>I'm writing a small convenience package for accessing a private API, and am using <code>httr</code> functions to conduct the requests. I'm also using Roxygen to handle documentation, etc. I'm importing <code>httr</code> functions as such:</p>
  
  <pre><code>#' Get a page of data from the specified endpoint.
  #' @keywords internal
  #' @importFrom httr GET
  #'
  get_data &lt;- function(url, headers, page_number) {
    # Add querystring for page
    url_with_page &lt;- paste0(url, "?page=", page_number)
    message("Downloading: ", url_with_page)
    # Get API response
    response &lt;- GET(url_with_page, headers)
    return(response)
  }
  </code></pre>
  
  <p>However, when you try to run the package with no pre-loaded packages, I get namespace errors:</p>
  
  <pre><code>Error in get_data(url, headers, 1) : 
    could not find function "GET"
  </code></pre>
  
  <p>I typically defer to <a href="http://r-pkgs.had.co.nz/namespace.html#namespace" rel="noreferrer">Hadley's expertise</a> on this sort of thing, but is this a good case for using the <code>Depends</code> field as well as/rather than <code>Imports</code>?</p>
  
  <p><em>Edit:</em> my NAMESPACE generated by Roxygen.</p>
  
  <pre><code># Generated by roxygen2 (4.1.1): do not edit by hand
  
  export(get_export)
  export(get_exports)
  export(get_metadata)
  importFrom(httr,GET)
  importFrom(httr,add_headers)
  importFrom(httr,content)
  importFrom(jsonlite,fromJSON)
  importFrom(jsonlite,rbind.pages)
  </code></pre>
  
  <p><em>Edit:</em> my DESCRIPTION file.</p>
  
  <pre><code>Package: APIpack
  Type: Package
  Title: APIpack
  Version: 0.1
  Date: 2016-01-04
  Authors: "Matt Policastro"
  Description: This package provides a set of convenience functions.
  License: Proprietary
  LazyData: TRUE
  Imports: httr,
      jsonlite
  Suggests: testthat
  </code></pre>