我想從這個網址下載的zip文件時:錯誤file.download下載自定義文件
url1 <- http://www.clinicaltrials.gov/ct2/results?cond=%22acne%22&studyxml=true
這裏是我的代碼:
tempZip <- tempfile()
download.file(url1, tempZip)
這裏是我得到的錯誤:
Warning message:
In download.file(url1, tempZip) :
downloaded length 817445 != reported length 200
任何想法?
編輯:好的,看到agstudy的回覆下面,我發現該文件確實被下載(它也似乎是正確的文件大小)。現在的問題是,當我嘗試解壓文件時 - 文件損壞的日子。
Maciej,我同意使用帶有.zip擴展名的鏈接會更好,但是,無法從此網站獲取該鏈接。