Re: [Rd] Integrate erros on certain functions

2018-03-24 Thread John P. Nolan
Dear John, Two issues. First, the default action is stop.on.error=TRUE, so anytime the integrate function can determine an error, it will stop. It doesn't detect an error, so no error is produced (whether you set stop.on.error=TRUE or FALSE). The second issue is the real problem: what automa

[Rd] aggregate() naming -- bug or feature

2018-03-24 Thread lmo via R-devel
Be aware that the object that aggregate returns with bar() is more complicated than you think. str(aggregate(iris$Sepal.Length, by = list(iris$Species), FUN = bar)) 'data.frame':    3 obs. of  2 variables:  $ Group.1: Factor w/ 3 levels "setosa","versicolor",..: 1 2 3  $ x  : num [1:3, 1:2] 5.

Re: [Rd] Function 'factor' issues

2018-03-24 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Sat, 24 Mar 2018 00:52:02 + writes: > I am trying once again. > By just changing > f <- match(xlevs[f], nlevs) > to > f <- match(xlevs, nlevs)[f] > , function 'factor' in R devel could be made more consist

Re: [Rd] Possible bug: file.exists() always returns TRUE for prn.us.txt

2018-03-24 Thread Joris Meys
Sorry for coming back at this, but would it make sense to have file.exists() return FALSE when it only finds one of these device names? Using backslashes to escape the dots makes file.exists() return the correct result. I got caught by this when I created file names based on a set of stock market t

Re: [Rd] Possible bug: file.exists() always returns TRUE for prn.us.txt

2018-03-24 Thread Joris Meys
Thank you. I was just replying my own message with the same information. Sorry for not doing the research properly before filing. Cheers Joris On Sat, Mar 24, 2018 at 11:36 AM, Duncan Murdoch wrote: > On 24/03/2018 6:16 AM, Joris Meys wrote: > >> Dear all, >> >> while preparing some exercises I

Re: [Rd] Possible bug: file.exists() always returns TRUE for prn.us.txt

2018-03-24 Thread Duncan Murdoch
On 24/03/2018 6:16 AM, Joris Meys wrote: Dear all, while preparing some exercises I came across some highly surprising behaviour of file.exists(). The specific value "prn.us.txt" always returns TRUE, even though that file is nowhere to be found on my system. That's a Windows "bug", not an R bu

[Rd] Possible bug: file.exists() always returns TRUE for prn.us.txt

2018-03-24 Thread Joris Meys
Dear all, while preparing some exercises I came across some highly surprising behaviour of file.exists(). The specific value "prn.us.txt" always returns TRUE, even though that file is nowhere to be found on my system. In a fresh R session 3.4.4 installed on Windows 10: > grep("prn.us.txt", dir(r