title: Extract documentation from an r package
body: <p>I'm trying to write an R function which will extract exported functions from an R package and return a list containing for each function, the call signature, and the description from documentation.</p>
  
  <p>Getting the list of exported functions can be done with relative ease by doing the following:</p>
  
  <pre><code># Extracts all exported function names from dplyr
  library(dplyr) 
  lsf.str("package:dplyr")
  </code></pre>
  
  <p>I can also get the call signature for a given function using the name:</p>
  
  <pre><code># Extract call signature for the join function in dplyr
  lsf.str("package:dplyr")[10] %&gt;%
    get() %&gt;%
    deparse() %&gt;%
    head(1)
  </code></pre>
  
  <p>I can even automatically open up the help section for each one of those functions:</p>
  
  <pre><code># Opens help for the join function in dplyr
  help(lsf.str("package:dplyr")[10], package = "dplyr")
  </code></pre>
  
  <p>But how can can I return a string containing the text of the description for this function?  So, for the join function in dplyr, it ought to return:</p>
  
  <blockquote>
    <p>These are generic functions that dispatch to individual tbl methods - see the method documentation for details of individual data sources. x and y should usually be from the same data source, but if copy is TRUE, y will automatically be copied to the same source as x.</p>
  </blockquote>
  
  <p>Any ideas?</p>