title: How to read multiple PDF files in R?
body: <p>I have a script that I am using to read multiple PDF files. Here is my code</p>
  
  <pre><code>corpus_raw &lt;- data.frame("company" = c(),"text" = c(), check.names = FALSE)
  
  for (i in 1:length(pdf_list)){
    print(i)
    document_text &lt;- pdf_text(paste("V:/CodingProject2_FundOverview/", pdf_list[i],sep = "")) %&gt;% 
      strsplit("\r\n") 
  
    document &lt;- data.frame("company" = gsub(x = pdf_list[i],pattern = ".pdf", replacement = ""), 
                "text" = document_text, stringsAsFactors = FALSE, check.names = FALSE)
  
    colnames(document) &lt;- c("company", "text")
    corpus_raw &lt;- rbind(corpus_raw,document) 
  }
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE,  : 
    arguments imply differing number of rows: 79, 56
  </code></pre>
  
  <p>I even tried to keep the <code>check.names = FALSE</code> but it seems like I am doing something wrong. Any help will be appreciated. Thanks</p>