title: how to read text in a table from a csv file
body: <p>I am new using the tm package. I want to read a csv file which contents one column with 2000 texts and a second column with a factor variable yes/no into a Corpus. My intention is to convert the text as a matrix and use the factor variable as target for prediction. I would need to divide the corpus in train and test sets as well. 
    I read several documents like tm.pdf etc. and found the documentation relatively limited. This is my attempt following another threat on the same subject,</p>
  
  <pre><code>TexTest&lt;-read.csv("C:/Test.csv")
   m &lt;- list(Text = "Text", Clasification = "Classification")
   corpus1 &lt;-
  Corpus(x=TexTest,readerControl=list(reader=readTabular(mapping=m),language="en"))
  
  Error in if (x$Length &gt; 0) vector("list", as.integer(x$Length)) else list() : 
    argument is of length zero
  </code></pre>
  
  <p>Using </p>
  
  <pre><code>corpus1 &lt;- Corpus(VectorSource(TexTest))
  </code></pre>
  
  <p>results in </p>
  
  <pre><code>A corpus with 2 text documents
  </code></pre>
  
  <p>instead of 2000 texts. </p>
  
  <p>How is the standard procedure here? 
  Thanks</p>