> Suharto Anggono Suharto Anggono
> on Sat, 10 Sep 2016 02:36:54 + writes:
> Looking at the code of function 'table' in R devel r71227, I see that the
part "remove NA level if it was added only for excluded in factor(a,
exclude=.)" is not quite
0, exclude, nomatch=0L)
is to be treated similarly.
Example that gives wrong result in R devel r71225:
table(3:1, exclude = 1)
table(3:1, exclude = 1, useNA = "always")
On Tue, 16/8/16, Martin Maechler <maech...@stat.math.ethz.ch> wrote:
Su
ge, soon.
Martin
>
> On Tue, 16/8/16, Martin Maechler <maech...@stat.math.ethz.ch> wrote:
> Subject: Re: [Rd] table(exclude = NULL) always includes NA
> Cc: "Martin Maechler" <maech...@stat.
luded in ‘NA’ counts.
The last statement is actually not true for an argument that is already a
factor.
On Tue, 16/8/16, Martin Maechler <maech...@stat.math.ethz.ch> wrote:
Subject: Re: [Rd] table(exclude = NULL) always includes NA
Cc
> Martin Maechler
> on Mon, 15 Aug 2016 12:35:41 +0200 writes:
> Martin Maechler
> on Mon, 15 Aug 2016 11:07:43 +0200 writes:
> Suharto Anggono Suharto Anggono
> on Sun, 14
> Martin Maechler
> on Mon, 15 Aug 2016 11:07:43 +0200 writes:
> Suharto Anggono Suharto Anggono
> on Sun, 14 Aug 2016 03:42:08 + writes:
>> useNA <- if (missing(useNA) && !missing(exclude) && !(NA %in%
> Suharto Anggono Suharto Anggono
> on Sun, 14 Aug 2016 03:42:08 + writes:
> useNA <- if (missing(useNA) && !missing(exclude) && !(NA %in% exclude))
"ifany"
> An example where it change 'table' result for non-factor input, from
ude=NaN)
I bring the example up, in case that the change in result is not intended.
On Sat, 13/8/16, Martin Maechler <maech...@stat.math.ethz.ch> wrote:
Subject: Re: [Rd] table(exclude = NULL) always includes NA
To: "Martin Maechler" &l
er long.
> you are right... but then, the places / cases where the
> behavior would change back should be quite rare.
>> If not, I suggest changing summary().
>>
> Thank you for your feedback, Suharto! Martin
-
Thank you for your feedback, Suharto!
Martin
> On Thu, 11/8/16, Martin Maechler <maech...@stat.math.ethz.ch> wrote:
>
> Subject: Re: [Rd] table(exclude = NULL) always includes NA
>
> @r-project.org
> Cc: "Martin Maechler" &
e:
Subject: Re: [Rd] table(exclude = NULL) always includes NA
@r-project.org
Cc: "Martin Maechler" <maech...@stat.math.ethz.ch>
Date: Thursday, 11 August, 2016, 12:39 AM
>>>>> Martin Maechler <maech...@stat.math.ethz.ch>
>>>>> on Tue, 9 Aug 2
> Martin Maechler
> on Tue, 9 Aug 2016 15:35:41 +0200 writes:
> Suharto Anggono Suharto Anggono via R-devel
> on Sun, 7 Aug 2016 15:32:19 + writes:
> > This is an example from
> >
> Suharto Anggono Suharto Anggono via R-devel
> on Sun, 7 Aug 2016 15:32:19 + writes:
> This is an example from
> https://stat.ethz.ch/pipermail/r-help/2007-May/132573.html .
> With R 2.7.2:
> > a <- c(1, 1, 2, 2, NA, 3); b <- c(2, 1, 1, 1, 1, 1)
> >
This is an example from
https://stat.ethz.ch/pipermail/r-help/2007-May/132573.html .
With R 2.7.2:
> a <- c(1, 1, 2, 2, NA, 3); b <- c(2, 1, 1, 1, 1, 1)
> table(a, b, exclude = NULL)
b
a 1 2
11 1
22 0
31 0
1 0
With R 3.3.1:
> a <- c(1, 1, 2, 2, NA, 3); b <-
14 matches
Mail list logo