datasets數(shù)據(jù)集
data(package = 'datasets')
?AirPassengers #打開數(shù)據(jù)集的幫助文件
圖片.png
獲取網(wǎng)頁數(shù)據(jù)
圖片.png
library(XML)
u1="http://stockdata.stock.hexun.com/2008en/zxcwzb.aspx?stockid=000002&type=1&date=2013.06.30" #將待讀取網(wǎng)頁數(shù)據(jù)賦值給u1
tables1 = readHTMLTable(u1) #將讀取的數(shù)據(jù)賦值給tables1
tables1[[1]] #第一維度數(shù)據(jù)
tables1[[2]] #第二維度數(shù)據(jù)
tables1[[3]] #第三維度數(shù)據(jù)
tables1[[4]] #第四維度數(shù)據(jù)