我知道在這個主題上有很多帖子,我通常能夠完成我想要的東西,但我在這個特定鏈接中遇到了麻煩。這很可能與excel文件的非正統佈局有關。這是我的工作流程:從鏈接下載xlsx並導入到r
library(rest)
url<-"http://irandataportal.syr.edu/wp-content/uploads/3.-economic-participation-and-unemployment-rates-for-populationa-aged-10-and-overa-by-ostan-province-1380-1384-2001-2005.xlsx"
unemp <- url %>%
read.xls()
產生錯誤Error in getinfo.shape(fn) : Error opening SHP file
問題是不相關的數據的抓取。將數據導入可用格式方面出現問題。例如,read.xls("file.path/file.csv")
會產生相同的錯誤。
查看幫助頁'?download.file' – shayaa