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
## 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
> "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
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
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
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
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
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