我想在R中導入日曆日期。 我找到了一個網站,其日期是我用XML
導入的。從網絡rbind日曆數據 - 列表錯誤
library('XML')
u="http://www.timeanddate.com/calendar/custom.html?year=2015&country=5&typ=0&display=2&cols=0&hol=0&cdt=1&holm=1&df=1"
tables = readHTMLTable(u)
擺脫一些不必要的元素
tables = tables[-1]
tables = tables[-1]
tables = tables[-13]
生成列表名稱
names(tables) <- paste('month', 1:12, sep = '')
mtables = mapply(cbind, tables, 'Month'= 1:12, SIMPLIFY=F)
這裏的時候,我想我的rbind
清單:
do.call('rbind', mtables)
我得到一個錯誤:
Error in match.names(clabs, names(xi)) :
names do not match previous names
了,你能解決這個誤差問題幫助嗎?
@PierreLafortune - 它不工作以重現該示例? – giacomo