Hi All—

I am using Tabulizer to extract tables from PDF files. Tabulizer
creates a list of matrices for each set of tables in each document.
My code, below, works well. Then i thought i would use lapply instead
of for loop since it is a little faster and more compact,
but i kept getting an error message below.

Any help is greatly appreciated

EK

install.packages("tabulizer")
installed.packages("stringr")
library(stringi)
library(tabulizer)
path = "C:/Users/name/Documents/TextMining/"
file.names <- dir(path, pattern =".PDF")

for(i in 1:length(file.names)){
  print(file.names[i])
  A[[i]] <- extract_tables(file.names[i])
}


lapply(file.names, function(i) A[[i]] <- extract_tables(file.names[i]))

 Error in normalizePath(path.expand(path), winslash, mustWork) :
  path[1]="NA": The system cannot find the file specified

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to