r - Download.file function does not seem to work -


i want extract data .csv online r. therefore im doing (ive created dir called "data")

fileurl <- "https://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accesstype=download" download.file(fileurl, destfile = "./data/cameras.csv", method="curl") 

it gives following error however:

 warning messages:  1: running command 'curl  "https://data.baltimorecity.gov/api/views/dz54-     2aru/rows.csv?accesstype=download"  -o "./data/cameras.csv"' had status    127   2: in download.file(fileurl, destfile = "./data/cameras.csv", method  = "curl") download had nonzero exit status 

and if remove method= "curl"

error in download.file(fileurl, destfile = "./data/cameras.csv") :  unsupported url scheme 

any thoughts on goes wrong?

i had problem. changing method = "curl" method = "auto" worked me.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -