u = 'http://tech.163.com/special/00094IGJ/top1000.html'
url = htmlParse(u, encoding="GB2312")
tables = readHTMLTable(url)
raw = tables[[6]]
查看raw中文显示乱码, 查看sessionInfo(),
R version 2.15.1 (2012-06-22)
Platform. x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936
[2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] XML_3.95-0.1
loaded via a namespace (and not attached):
[1] tools_2.15.1