0

I am using tabulizer library to extract tables from pdf in R.

It works fine for one file using

extract_tables("test.pdf");

It print all the tables in a pdf. (Different Table can have different no of columns)

But when i have multiple files in folder and use for loop , then it print only one table.

templist <- list.files(pattern = "pdf$")
my_pdfs = {}
for (i in 1:length(templist)){my_pdfs[i] <- extract_tables(templist[i])}

// Above mypdfs array took only 1st table data in object.

How can i get all tables thru for loop?

Thanks.

r2evans
  • 141,215
  • 6
  • 77
  • 149
Thinker
  • 6,820
  • 9
  • 27
  • 54
  • 1
    what happens if you run: `templist <- list.files(pattern = "pdf$", full.names = TRUE);my_pdfs <- lapply(templist, extract_tables)`? – Wimpel Jan 10 '23 at 08:15

0 Answers0