[R-SIG-Mac] download R 3.2.1 on mac OS

Duncan Murdoch murdoch.duncan at gmail.com
Fri Aug 26 13:21:14 CEST 2016


On 25/08/2016 11:03 PM, Valentina Blohm Crenovich wrote:
> thanks, it helps a lot but I get the following instead of downloading:
>
> 100  9443  100  9443    0     0  26789      0 --:--:-- --:--:--
> --:--:-- 46517     0      0 --:--:-- --:--:-- --:--:--     0

If you saw messed up output like that, you're probably using RStudio, 
which doesn't display download.file output properly.  In other front 
ends this would appear as a progress report.

Duncan Murdoch

>>
>
> , also I tried
>
>> fileUrl<- "https://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD"
>> download.file(fileUrl, destfile="cameras.csv", method="curl")
>
> and the output is:
>
> 100  9443  100  9443    0     0   7196      0  0:00:01  0:00:01
> --:--:-- 65576      0 --:--:--  0:00:01 --:--:--     0
> Valentina Blohm
>
> Estudiante de Economía
> Facultad de Economía y Negocios
> Universidad de Chile
>
>
> 2016-08-25 22:42 GMT-04:00 David Winsemius <dwinsemius at comcast.net>:
>>
>>> On Aug 25, 2016, at 7:11 PM, Valentina Blohm Crenovich <vblohm at fen.uchile.cl> wrote:
>>>
>>> *Hello!*
>>>
>>> *I have the following error system Mac OS 10.6.8 R 3.2.1 :*
>>>
>>>
>>> *>fileUrl<-
>>> "https:data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD
>>> <http://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD>"*
>>
>> I'm not sure this is really a mac question but since there is a mac issue with downloading that I have solved with package::download I offer this suggestion. Need to know your working or target directory name (or create it with path.expand) since download.file does not do path expansion.
>>
>>
>> Also note that your url is either malformed or at the very least confusing. Cannot tell if it is https: or http:. Should just be:
>>
>>
>> fileUrl <-
>> "http://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD"
>>
>> # Then with downloader installed and assuming that a ./data/ subdirectory exists:
>>
>> library(downloader)
>> download( fileUrl, destfile=path.expand("./data/cameras.csv")
>>
>> Note that it would be more typical on a Mac to see "~/" than "./" or to see a setwd("./data") call.
>>
>> --
>> David.
>>
>>>
>>> *> download.file(fileUrl, destfile="./data/cameras.csv",method="curl")*
>>>
>>> *curl: (6) Warning message:*
>>> *In download.file(fileUrl, destfile = "./data/cameras.csv", method =
>>> "curl") :*
>>> *  download had nonzero exit status*
>>> *Couldn't resolve host 'https:data.baltimorecity.gov
>>> <http://data.baltimorecity.gov>'*
>>>
>>> Thank you
>>> Tina
>>>
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>> David Winsemius
>> Alameda, CA, USA
>>
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list