title: Why does `devtools::document()` trip on `setMethod` whose function definition is empty?
body: <p>Assume I am building an R package with <code>devtools</code> in RStudio.</p>
  
  <p>Assume also I have this R source file with the following code:</p>
  
  <pre class="lang-r prettyprint-override"><code>#' @param object An object
  #' @param data Numeric vector or data.frame
  #' @param Fun Function. Default function is \code{sum}
  #' @param ... Extra named arguments passed to FUN
  #' @rdname myGeneric
  #' @export
  setGeneric("myGeneric", function(object, data, FUN, ...)
  {standardGeneric ("myGeneric")} )
  
  #' @rdname myGeneric
  setMethod("myGeneric", c("numeric", "numeric", "function"),
            function(object, data, FUN, ...) {
              return(42)
              }
            )
  
  </code></pre>
  
  <p>Now, <code>devtools::document(roclets=c('rd', 'collate', 'namespace'))</code> runs fine except for that warning about the missing <em>name/title</em>:</p>
  
  <pre><code>&gt; devtools::document(roclets=c('rd', 'collate', 'namespace'))
  Updating gwasrapidd documentation
  Loading gwasrapidd
  Writing NAMESPACE
  Writing NAMESPACE
  Warning message:
  myGeneric.Rd is missing name/title. Skipping 
  </code></pre>
  
  <p>However if I comment that line <code>return(42)</code> inside the function definition like so:</p>
  
  <pre class="lang-r prettyprint-override"><code>#' @param object An object
  #' @param data Numeric vector or data.frame
  #' @param Fun Function. Default function is \code{sum}
  #' @param ... Extra named arguments passed to FUN
  #' @rdname myGeneric
  #' @export
  setGeneric("myGeneric", function(object, data, FUN, ...)
  {standardGeneric ("myGeneric")} )
  
  #' @rdname myGeneric
  setMethod("myGeneric", c("numeric", "numeric", "function"),
            function(object, data, FUN, ...) {
              #return(42)
              }
            )
  </code></pre>
  
  <p>and run again <code>devtools::document(roclets=c('rd', 'collate', 'namespace'))</code> I get now an error:</p>
  
  <pre><code>&gt; devtools::document(roclets=c('rd', 'collate', 'namespace'))
  Updating gwasrapidd documentation
  Loading gwasrapidd
  Error in method_body[[2]] : subscript out of bounds
  
  </code></pre>
  
  <p>My question is why? Is it a bug of <code>devtools</code>?</p>
  
  <p>Package versions:</p>
  
  <ul>
  <li>devtools_1.13.6</li>
  <li>roxygen2_6.1.1</li>
  </ul>