title: create a Corpus from many html files in R
body: <p>I would like to create a Corpus for the collection of downloaded HTML files, and then read them in R for future text mining. </p>
  
  <p>Essentially, this is what I want to do:</p>
  
  <ul>
  <li>Create a Corpus from multiple html files. </li>
  </ul>
  
  <p>I tried to use DirSource:</p>
  
  <pre><code>library(tm)
  a&lt;- DirSource("C:/test")
  b&lt;-Corpus(DirSource(a), readerControl=list(language="eng", reader=readPlain))
  </code></pre>
  
  <p>but it returns "invalid directory parameters"</p>
  
  <ul>
  <li><p>Read in html files from the Corpus all at once. 
  Not sure how to do it.</p></li>
  <li><p>Parse them, convert them to plain text, remove tags. 
  Many people suggested using XML, however, I didn't find a way to process multiple files. They are all for one single file. </p></li>
  </ul>
  
  <p>Thanks very much.</p>