title: text mining in R- input is an Excel file with each row being one document
body: <p>I am new to R. I have a CSV file that includes 15000 rows of text, each row belongs to one person. I want to do Latent Dirichlet Allocation on it. But, first I need to create a term document matrix. However, I don't know how to make R to treat each row as a document. Here is what I've done, but it doesn't look correct:</p>
  
  <pre><code>text &lt;- read.csv("text.csv", stringsAsFactors = FALSE)
  corpus  Corpus(VectorSource(text))
  
  
  
  corpus &lt;- tm_map(corpus, content_transformer(removePunctuation))
  corpus &lt;- tm_map(corpus, removeWords, stopwords("english"))
  corpus &lt;- tm_map(corpus, removeNumbers)
  corpus &lt;- tm_map(corpus, stemDocument)
  corpus &lt;- tm_map(corpus, stripWhitespace)
  dtm &lt;- DocumentTermMatrix(corpus)
  </code></pre>
  
  <p>the current dtm doesn't look like having all the terms in all the documents in columns. I feel like they're only words in each document.</p>
  
  <p>I really appreciate your help</p>