download.file() in R has non zero exit status

Still don't understand why removing method = "curl" don't solve the problem.

Another solution is install the downloader package which wrap download.file and make the download process easier and cross-platform (one function with same paramters for all OS)

install.packages("downloader")
fileUrl <- "https://data.baltimorecity.gov/api/views/dz54-2aru
            /rows.csv?accessType=DOWNLOAD"

require(downloader)
download(fileUrl, "data/cameras.csv", mode = "wb")

Hope that it will work this time


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)

Try another method: ..., method = "libcurl")

Tags:

Download

R