看板 R_Language 關於我們 聯絡資訊
原網址:http://www.mmh.org.tw/health/image/exam_services/exam_services.html R語言程式: library(XML) URL = paste0("http://www.mmh.org.tw/health/image/exam_services/exam_services.html") Sys.sleep(runif(1,1,2)) doc<-htmlParse(URL,encoding="UTF-8") tables<-readHTMLTable(doc,header=F,which = 2) tables dim(tables) 有些資料原本在右邊,但爬出來後出現在左邊 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.42.187.234 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1465129670.A.0C1.html
celestialgod: 你前一個文章的網址表格也會這樣 06/05 21:09
celestialgod: 這個要自己手動處理 06/05 21:09
celestialgod: 就參考我的回文即可 06/05 21:09