Le 25/04/2023 à 17:39, Bill Dunlap a écrit :
x <- c(1, 1, 2, 2, 2, 3)
y <- c(1, 2, 1, 3, NA, 3)
str(xyTable(x,y))
List of 3
$ x : num [1:6] 1 1 2 2 NA 3
$ y : num [1:6] 1 2 1 3 NA 3
$ number: int [1:6] 1 1 1 NA NA 1
How many (2,3)s do we have? At least one, the third entry, bu
x <- c(1, 1, 2, 2, 2, 3)
y <- c(1, 2, 1, 3, NA, 3)
> str(xyTable(x,y))
List of 3
$ x : num [1:6] 1 1 2 2 NA 3
$ y : num [1:6] 1 2 1 3 NA 3
$ number: int [1:6] 1 1 1 NA NA 1
How many (2,3)s do we have? At least one, the third entry, but the fourth
entry, (2,NA), is possibly a (2,3) so
Sokol [mailto:so...@insa-toulouse.fr]
>Sent: Tuesday, 25 April, 2023 11:35
>To: Viechtbauer, Wolfgang (NP); r-devel@r-project.org
>Subject: Re: [Rd] xyTable(x,y) versus table(x,y) with NAs
>
>I correct myself. Obviously, the line
>
>first[is.na(first) | isFALSE(first)] <- FALSE
I correct myself. Obviously, the line
first[is.na(first) | isFALSE(first)] <- FALSE
should read
first[is.na(first)] <- FALSE
Serguei.
Le 25/04/2023 à 11:30, Serguei Sokol a écrit :
Le 25/04/2023 à 10:24, Viechtbauer, Wolfgang (NP) a écrit :
Hi all,
Posted this many years ago
(https://stat
Le 25/04/2023 à 10:24, Viechtbauer, Wolfgang (NP) a écrit :
Hi all,
Posted this many years ago
(https://stat.ethz.ch/pipermail/r-devel/2017-December/075224.html), but either
this slipped under the radar or my feeble mind is unable to understand what
xyTable() is doing here and nobody bothered
Hi all,
Posted this many years ago
(https://stat.ethz.ch/pipermail/r-devel/2017-December/075224.html), but either
this slipped under the radar or my feeble mind is unable to understand what
xyTable() is doing here and nobody bothered to correct me. I now stumbled again
across this issue.
x <-
Hi All,
I asked this over at r-help, but didn't get any responses. As this seems like a
bug (or at least undocumented behavior) to me, I'll try again here.
It seems to me that xyTable() gets thrown off by NAs:
x <- c(1, 1, 2, 2, 2, 3)
y <- c(1, 2, 1, 3, NA, 3)
table(x, y, useNA="always")
xyTab