[R-SIG-Mac] download R 3.2.1 on mac OS
Hodgess, Erin
HodgessE at uhd.edu
Fri Aug 26 05:08:27 CEST 2016
Hi Valentina:
That's ok...that's how it downloads.
If you do
file.show("cameras.csv")
you will see your file
Erin M. Hodgess
Associate Professor
Department of Mathematics and Statistics
University of Houston - Downtown
mailto: hodgesse at uhd.edu
________________________________________
From: R-SIG-Mac [r-sig-mac-bounces at r-project.org] on behalf of Valentina Blohm Crenovich [vblohm at fen.uchile.cl]
Sent: Thursday, August 25, 2016 10:03 PM
To: David Winsemius
Cc: r-sig-mac at r-project.org
Subject: Re: [R-SIG-Mac] download R 3.2.1 on mac OS
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
>
, 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