Good day,
It's not described anywhere in the help page, but tapply and by functions will,
by default, convert factors into numeric values. Perhaps this needs to be
documented or the behaviour changed.
> tapply(1:3, 1:3, function(x) factor(LETTERS[x], levels = LETTERS))
1 2 3
1 2 3
The documen
On Wed, 14 Jun 2017, Gábor Csárdi wrote:
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.
> Suharto Anggono Suharto Anggono
> on Wed, 14 Jun 2017 17:17:38 + writes:
[quite important stuff, taking _longer_ to reply ...]
> > By the way, in NEWS, in "CHANGES IN R 3.4.0", in "SIGNIFICANT
USER-VISIBLE CHANGES", there is "factor() now uses order()
> Paul Johnson
> on Wed, 14 Jun 2017 19:00:11 -0500 writes:
> 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 functio
> :
> 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.
Yes. The meaning of that would certainly need to stay the same.
However, the following i