Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-27 Thread Kevin Ushey
Thanks for looking into this so promptly! Should users expect the behaviour to be congruent across all of the supported external programs (curl, wget) as well? E.g. URL <- "http://cran.rstudio.org/no/such/file/here.tar.gz"; download <- function(file, method, ...) print(download.file

Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-27 Thread Martin Morgan
R-devel r69197 returns appropriate errors for the cases below; I know of a few rough edges - ftp error codes are not reported correctly - download.file creates destfile before discovering that http fails, leaving an empty file on disk and am happy to hear of more. Martin On 08/27/2015 08:46

[Rd] Column name expansion in data.frame()

2015-08-27 Thread Michael Hahsler
Dear R developers: I am trying to add a column to a data.frame. The following does the trick by expanding the name of the first data frame with the prefix foo: > data.frame(foo = as.list(data.frame(items = 1:3, bar=1:3)), items = 1:3) foo.items foo.bar items 1 1 1 1 2

Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-27 Thread Jeroen Ooms
On Thu, Aug 27, 2015 at 5:16 PM, Martin Maechler wrote: > Probably I'm confused now... > Both R-patched and R-devel give an error (after a *long* wait!) > for >download.file("https://someserver.com/mydata.csv";, "mydata.csv") > > So that problem is I think solved now. I'm sorry for the c

Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-27 Thread Martin Morgan
On 08/27/2015 08:16 AM, Martin Maechler wrote: "DM" == Duncan Murdoch on Wed, 26 Aug 2015 19:07:23 -0400 writes: DM> On 26/08/2015 6:04 PM, Jeroen Ooms wrote: >> On Tue, Aug 25, 2015 at 10:33 PM, Martin Morgan wrote: >>> >>> actually I don't know that it does -- it a

Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-27 Thread Martin Maechler
> "DM" == Duncan Murdoch > on Wed, 26 Aug 2015 19:07:23 -0400 writes: DM> On 26/08/2015 6:04 PM, Jeroen Ooms wrote: >> On Tue, Aug 25, 2015 at 10:33 PM, Martin Morgan wrote: >>> >>> actually I don't know that it does -- it addresses the symptom but I think there sh

Re: [Rd] Proposed change in file.exists() to tolerate Windows

2015-08-27 Thread William Dunlap
## delete trailing slashes dts <- function(name) gsub("/$", "", name) if(!file.exists(dts(any_name))) { ... I don't think you want to delete the slash in "C:/" on Windows, as "C:" is not a file and "C:/" is. normalizePath() does odd things with "C:" as well. Bill Dunlap TIBCO Software

[Rd] Proposed change in file.exists() to tolerate Windows

2015-08-27 Thread Paul Johnson
I'm writing to ask if R Core would make file.exists more Windows tolerant when the argument has a trailing slash. This has been discussed by users a few times here, I know it is not a new topic. But it is not a solved problem, yet. I acknowledge that CRAN packages exist which fix this by replacing