0
我想使用R從網站上取消數據。我是新手在報廢數據。使用R從抓取數據從covers.com獲取錯誤
我的代碼如下:
library(XML)
url1<-"http://www.covers.com/sports/NCAAB/matchups?selectedDate=2015-02-28"
data1<-htmlTreeParse(url1)
getNodeSet(data1,"//div[@class = 'data-competition-type']")
然而,我等這樣的錯誤:
Error in UseMethod("xpathApply") :
no applicable method for 'xpathApply' applied to an object of class "XMLDocumentContent"
爲什麼我得到這個eror?我會很樂意提供任何幫助。非常感謝。
基本上,切換到'htmlParse' –