[Rd] duplicated factor labels.

2017-06-14 Thread Paul Johnson
Dear R devel I've been wondering about this for a while. I am sorry to ask for your time, but can one of you help me understand this? This concerns duplicated labels, not levels, in the factor function. I think it is hard to understand that factor() fails, but levels() after does not > x <-

Re: [Rd] [bug] droplevels() also drop object attributes (comment…)

2017-06-14 Thread Suharto Anggono Suharto Anggono via R-devel
In R devel r72789, the added part in 'factor' documentation (factor.Rd) is the following. Undocumentedly for a long time, \code{factor(x)} loses all \code{\link{attributes}(x)} but \code{"names"}, and resets \code{"levels"} and \code{"class"}. In the code of function 'factor', names(x) is

Re: [Bioc-devel] Build ERRORS caused by unable to be find dependencies

2017-06-14 Thread Marcin Kosiński
Hello bioc developers, The same error appeard for RTCGA as the one year ago. It is impossible to find dependent RTCGA.rnaseq package. http://bioconductor.org/checkResults/release/bioc-LATEST/RTCGA/tokay2-checksrc.html This is the only platform that has such an error. It appeared frequently

Re: [Rd] spurious warning in ave()

2017-06-14 Thread William Dunlap via R-devel
You can avoid the warnings and the unneeded calls to FUN by adding drop=TRUE to the call to ave(), since all of its ... arguments are passed to interaction (I think). In TERR we dealt with this problem by adding drop=TRUE to ave's argument list and we pass ... and drop=drop to interaction. I'm

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Andreas Kersting
Original Message From: Hadley Wickham [mailto:h.wick...@gmail.com] Sent: Wednesday, Jun 14, 2017 2:51 PM GMT To: Simon Urbanek Cc: Andreas Kersting; r-devel@r-project.org Subject: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines On Wed, Jun 14,

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Gábor Csárdi
I don't think it is reasonable to change the parser this way. This is currently valid R code: a <- "foo" "bar" and with the new syntax, it is also valid, but with a different meaning. Or you can even consider a <- "foo" bar %>% func() %>% print() etc. I like the idea of string literals, but

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread William Dunlap via R-devel
If you are changing the parser (which is a major change) you might consider treating strings in the C/C++ way: char *s = "A" "B"; means the same as char *s = "AB"; I am not a big fan of that syntax but it is widely used. A backslash at the end of the line leads to errors

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Andreas Kersting
Original Message From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Wednesday, Jun 14, 2017 1:36 PM GMT To: Andreas Kersting Cc: r-devel Subject: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines On 14/06/2017 6:45 AM, Andreas Kersting

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Serguei Sokol
Le 14/06/2017 à 12:58, Andreas Kersting a écrit : Hi, I would really like to have a way to split long string literals across multiple lines in R. ... An alternative approach could be to have something like ("aaa " "bbb") This is C-style and if the core-team decides to implement it, it could

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Hadley Wickham
On Wed, Jun 14, 2017 at 8:48 AM, Simon Urbanek wrote: > As I recall this has been discussed at least a few times (unfortunately I'm > traveling so can't check the references), but the justification was never > satisfactory. > > Personally, I wouldn't mind string

Re: [Rd] Possible with enableJIT function

2017-06-14 Thread Berend Hasselman
> On 13 Jun 2017, at 22:05, luke-tier...@uiowa.edu wrote: > > Thanks. This should be resolved in R-devel(r72788) and R-patched > (r72789) > Also thanks. It is resolved in R-patched. Berend > Best, > > luke > > On Mon, 12 Jun 2017, Berend Hasselman wrote: > >> >> >> In this email to the

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Simon Urbanek
As I recall this has been discussed at least a few times (unfortunately I'm traveling so can't check the references), but the justification was never satisfactory. Personally, I wouldn't mind string continuation supported since it makes for more readable code (I had one of my packages raise a

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Duncan Murdoch
On 14/06/2017 6:45 AM, Andreas Kersting wrote: On Wed, 14 Jun 2017 06:12:09 -0500, Duncan Murdoch wrote: On 14/06/2017 5:58 AM, Andreas Kersting wrote: Hi, I would really like to have a way to split long string literals across multiple lines in R. I don't

[Rd] spurious warning in ave()

2017-06-14 Thread Therneau, Terry M., Ph.D.
Consider the following simple data set and a call to ave: > tdata <- data.frame(f1=c(1,1,1,1,2,2,2,2), f2=c(1,2,1,2,1,1,1,1), y=1:8) > with(tdata, table(f1, f2)) f2 f1 1 2 1 2 2 2 4 0 > with(tdata, ave(y, f1, f2, FUN=max)) [1] 3 4 3 4 8 8 8 8 Warning message: In FUN(X[[i]], ...) : no

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Joris Meys
Hi Mark, I got you. I just pointed out the obvious to illustrate why your emulation didn't eliminate the need for the real thing. I didn't mean to imply you weren't aware of this, even though it may seem so. Sometimes I'm not 100% aware of the subtleties of the English language. This seems one of

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Mark van der Loo
I know it doesn't cause construction at parse time, and it was also not what I said. What I meant was that it makes the syntax at least look a little as if you have a line-breaking character within string literals. Op wo 14 jun. 2017 om 14:18 schreef Joris Meys : > Mark,

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Joris Meys
Mark, that's actually a fair statement, although your extra operator doesn't cause construction at parse time. You still call paste0(), but just add an extra layer on top of it. I also doubt that even in gigantic loops the benefit is going to be significant. Take following example: atestfun <-

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Mark van der Loo
Having some line-breaking character for string literals would have benefits as string literals can then be constructed parse-time rather than run-time. I have run into this myself a few times as well. One way to at least emulate something like that is the following. `%+%` <- function(x,y)

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Andreas Kersting
On Wed, 14 Jun 2017 06:12:09 -0500, Duncan Murdoch wrote: > On 14/06/2017 5:58 AM, Andreas Kersting wrote: > > Hi, > > > > I would really like to have a way to split long string literals across > > multiple lines in R. > > I don't understand why you require the string

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Gábor Csárdi
On Wed, Jun 14, 2017 at 12:12 PM, Duncan Murdoch wrote: > On 14/06/2017 5:58 AM, Andreas Kersting wrote: >> >> Hi, >> >> I would really like to have a way to split long string literals across >> multiple lines in R. You can also look at the glue package, it supports

Re: [Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Duncan Murdoch
On 14/06/2017 5:58 AM, Andreas Kersting wrote: Hi, I would really like to have a way to split long string literals across multiple lines in R. I don't understand why you require the string to be a literal. Why not construct the long string in an expression like paste0("aaa",

[Rd] [WISH / PATCH] possibility to split string literals across multiple lines

2017-06-14 Thread Andreas Kersting
Hi, I would really like to have a way to split long string literals across multiple lines in R. Currently, if a string literal spans multiple lines, there is no way to inhibit the introduction of newline characters: > "aaa + bbb" [1] "aaa\nbbb" If a line ends with a backslash, it is just