这在我的机器上运行良好:
zz <- tabulizer::extract_tables("http://vege1.kan.ynu.ac.jp/traits/PlantTraitAsia.pdf", pages = 2)
head(zz[[1]])
这会产生:
[,1] [,2] [,3]
[1,] "ID" "Category\rof\rpermissio" "Species"
[2,] "83" "A" "Abies mariesii Masters"
[3,] "155" "A" "Abies mariesii Masters"
[4,] "225" "A" "Abies mariesii Masters"
[5,] "297" "A" "Abies mariesii Masters"
[6,] "369" "A" "Abies mariesii Masters"
[,4] [,5] [,6]
[1,] "Traits" "Value" "Notes"
[2,] "Maximum heighyt (m)" "18.17" ""
[3,] "Shade tolerance (min. relative\rlight intensity, %), Anderson\r1964. J. Ecol." "1.15" ""
[4,] "Length of fruit (mm)" "8" ""
[5,] "Pollination mode" "Anemophily" ""
[6,] "Type of fruit" "Wing-hair" ""
要仅获取标题(表格的第一行):
zz[[1]][1,]