R中的download.file()具有非零退出状态 [英] download.file() in R has non zero exit status
本文介绍了R中的download.file()具有非零退出状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在R 3.0.1(Windows 7)中下载一个文件:
I am trying to download a file in R 3.0.1 (Windows 7):
fileUrl <- "https://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD"
download.file(fileUrl, destfile="./data/cameras.csv", method="curl")
我检查了网址和我的互联网连接,他们似乎工作正常。但是,我收到以下消息:
I checked both the url and my internet connection and they seem to be working just fine. However, I get this message:
Warning message:
In download.file(fileUrl, destfile = "./data/cameras.csv", method = "curl") :
download had nonzero exit status
在线找不到任何帮助,任何人都知道如何解决这个问题?
Can't find any help online, anybody knows how to fix this?
推荐答案
但我认为主要的问题是您不必要地使用 https
。我认为这样做:
The answer by @dickoa probably works, but I think the major issue is that you are using https
unnecessarily. I think this works:
# Note the http instead of https
file<-'http://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD'
read.csv(file)
这篇关于R中的download.file()具有非零退出状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文