提取PDF文件中的表格
2021-05-20 本文已影响0人
董八七
# BiocManager::install("tabulizer")
library(tabulizer)
# I create a dummy list to iterate through all the pages and push a data.frame in
result <- list()
for (i in 1:3){
result[[i]] <- as.data.frame(extract_tables("C:/Users/Dong/Downloads/Documents/Extracted pages from Draper - 1998 - OARDC_special_circular_n157.pdf", page = i, method = 'stream'), stringsAsFactors = FALSE)
}
# df=rbind(result[[1]],result[[2]])
# df=result[[2]]
write.csv(result[[3]], file = "D:/0.csv")