suxia
最近在网上看到可以用R爬数据的。但是出现了问题不会解决。请大神指点迷津。
##问题1
library("XML", lib.loc="F:/RStudio/R-3.1.2/library")
library("RCurl", lib.loc="~/R/win-library/3.1")
url = 'http://www.stats.gov.cn/tjsj/ndsj/2014/indexch.htm'##统计之都上的数据
doc<-htmlParse(url)
x <- readHTMLTable(doc)
##得出结果
> x
named list()
###问题2
u1="http://tech.163.com/special/00094IGJ/top1000.html"
ta=readHTMLTable(u1,encoding="UTF-8")
得到的是一堆乱码?
问题有点多。