Skip to content
Back to formatted view

Raw Message

Message-ID: <4A227D60.4030907@gmail.com>
Date: 2009-05-31T12:51:44Z
From: Jakson A. Aquino
Subject: Bug in gmodels CrossTable()?

Is the code below showing a bug in Crosstable()? My expectation was that
the values produced by xtabs were rounded instead of truncated:

library(gmodels)
abc <- c("a", "a", "b", "b", "c", "c")
def <- c("d", "e", "f", "f", "d", "e")
wgt <- c(0.8, 0.6, 0.4, 0.5, 1.4, 1.3)

xtabs(wgt ~ abc + def)

CrossTable(xtabs(wgt ~ abc + def), prop.r = F, prop.c = F,
  prop.t = F, prop.chisq = F)

-- 
Jakson Aquino
Professor of Political Science
Federal University of Ceara, Brazil