0
在一臺機器(Windows 7)中的代碼工作做好:如何從WWW解析在Windows Server 2012 - 錯誤
library(XML)
library(RCurl)
library(xtable)
library(httr)
library(xml2)
theurl <- "https://biz.yahoo.com/c/s.html"
webpage <- content(GET(theurl))
tables <- readHTMLTable(webpage)
splits <- tables[[length(tables)]]
splits
> splits
Payable Ex\nDate Company Symbol Optionable? Ratio Announced Add\nTo MyCalendar
1 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
2 May 19 May 20 Alliant Energy LNT Y 2-1 Apr 20 Add
3 May 27 May 30 Stock Yards Bancorp SYBT N 3-2 May 02* Add
在Windows Server 2012中存在錯誤:
tables <- readHTMLTable(webpage)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘readHTMLTable’ for signature ‘"xml_document"’
有什麼事情是原因嗎? 有沒有其他的可能性來解析這個www?