title: Elaboration ordering file with tm package in R
body: <p>I created a script for the frequency of words in test documents (000_1.txt,000_2.txt,000_11.txt) in R. 
  I want the file elaboration in order with numerical end (1,2,11).</p>
  
  <p>The SO is Windows 7. The directory "E:\testR" contains the files.</p>
  
  <p>This is the code</p>
  
  <pre><code>library("tm")
  
  pathElaboration &lt;- "E:/testR"
  setwd(pathElaboration)
  dirSource &lt;- DirSource(pathElaboration, encoding =   "ISO-8859-2",pattern="*.txt")
  vCorpusFiles &lt;- VCorpus(dirSource, readerControl = list(language = "en"))
  for (i in seq(from= 1, to=length(vCorpusFiles), by=1))
  {
    dtm &lt;- DocumentTermMatrix(vCorpusFiles[i])
    vectorFrequencyWord &lt;- as.matrix(dtm)
    print(vectorFrequencyWord)
  }
  </code></pre>
  
  <p>But the result is</p>
  
  <pre><code>           Terms
  Docs        file1
    000_1.txt     1
             Terms
  Docs         wordinfile11
    000_11.txt            1
            Terms
  Docs        wordinfile2
    000_2.txt           1
  </code></pre>
  
  <p>I would have the sequence 000_1.txt, 000_2.txt, 000_11.txt in elaboration</p>
  
  <p>How can I fix this?  </p>