From ligges at statistik.tu-dortmund.de  Fri Feb 19 17:49:45 2016
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Fri, 19 Feb 2016 17:49:45 +0100
Subject: [Rd] default destfile in download.file()
In-Reply-To: <CABFfbXuJz9Y-E2unZ+U9-bSjYVYWJdKW1a68ogqMXe6P9Ciuig@mail.gmail.com>
References: <CABFfbXuJz9Y-E2unZ+U9-bSjYVYWJdKW1a68ogqMXe6P9Ciuig@mail.gmail.com>
Message-ID: <56C747A9.3030406@statistik.tu-dortmund.de>



On 18.02.2016 12:01, Jeroen Ooms wrote:
> A nice default value for the `destfile` argument in download.file() would
> be `basename(url)` i.e. the name of the downloaded file. This would
> correspond to default behavior in many other web/ftp clients and makes code
> slightly more concise:
>
>    download.file("https://svn.r-project.org/R/trunk/doc/CRAN_mirrors.csv")
>    mirrors <- read.csv("CRAN_mirrors.csv")

This contradicts our approach not to overwrite files in the user 
filespace that are not explicitly mentioned as an argument.

Best,
Uwe Ligges


>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] default destfile in download.file()
Uwe Ligges