From wolfgang.viechtbauer at maastrichtuniversity.nl  Thu Dec 14 21:05:27 2017
From: wolfgang.viechtbauer at maastrichtuniversity.nl (Viechtbauer Wolfgang (SP))
Date: Thu, 14 Dec 2017 20:05:27 +0000
Subject: [Rd] xyTable(x,y) versus table(x,y) with NAs
Message-ID: <ba84fd5fbe954e0386a96f3941bf9d84@UM-MAIL3216.unimaas.nl>

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")
xyTable(x, y)

Is this intended behavior?

Best,
Wolfgang



[Rd] xyTable(x,y) versus table(x,y) with NAs
Viechtbauer Wolfgang (SP