0
我一直在嘗試下載this table到R沒有成功。從網站下載表到R
我正在使用的代碼是這樣的一個
library(XML)
web_banrep <- "http://obieebr.banrep.gov.co/analytics/saw.dll?Go&Action=prompt&lang=es&NQUser=publico&NQPassword=publico&path=%2Fshared%2fSeries%20Estad%C3%ADsticas%2F1.%20Empleo%20y%20desempleo%2F1.1%20Serie%20hist%C3%B3rica%2F1.1.1.EMP_Total%20nacional&Options=rdf"
desemp <- readHTMLTable(web_banrep, header=T, which=1,stringsAsFactors=F)
我會很感激的任何幫助。
表格是動態生成的,實際上並未嵌入到該頁面的HTML中。當_browser_訪問頁面時會生成一些javascript,生成表格,但是當_R_查看該地址時,它只會看到一個錯誤頁面。請親自看看 - 使用'download.file(web_banrep,'what_R_sees.txt')'下載文件。你可能有更好的運氣下載他們也提供的數據的Excel文件。 –