Re: [R] download.file()

From: Henrik Bengtsson <hb_at_stat.berkeley.edu>
Date: Tue, 18 Mar 2008 09:38:14 -0700

On Tue, Mar 18, 2008 at 9:10 AM, Prof Brian Ripley <ripley_at_stats.ox.ac.uk> wrote:
> /geodat *is* an absoute path!
>
> The second argument of download.file is called 'destfile', so what makes
> you think it is a desination *directory*?

The help file might be the source of confusion:

"destfile: A character string with the name where the downloaded file is saved. Tilde-expansion is performed."

...especially the word "where". Better with "A character string specifying the name [pathname?] of the saved file" is better.

/Henrik

>
> Your command works for me, using an account that has write permission in /
> , and not otherwise. (It seems very unsafe that you would be using such
> an account unless this is a pre-Vista Windows machine.)
>
>
>
> On Tue, 18 Mar 2008, Paul Evans wrote:
>
> > Hi,
> >
> > I wanted to download a file and did the following:
> > ---------------------------------------------------------
> >> fileLink <- 'ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE1000/GSE1000_RAW.tar'
> >> download.file(fileLink,'/geoDat')
> > trying URL 'ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE1000/GSE1000_RAW.tar'
> > ftp data connection made, file length 35307520 bytes
> > opened URL
> > downloaded 34480Kb
> >
> >>
> > ------------------------------------------------------------
> >
> > However, when I look in the destination directory ('/geoDat'), the file
> > is not there (I also tried giving it the absolute path).
> >
> > What am I doing wrong?
>
> Not reading the help page?
>
>
> > thanks!
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > Be a better friend, newshound, and
> >
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help_at_r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel: +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595
>
>
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 18 Mar 2008 - 16:43:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 18 Mar 2008 - 17:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive