[R] Bug in gmodels CrossTable()?

Jakson Alves de Aquino jaksonaquino at gmail.com
Sun May 31 14:51:44 CEST 2009


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




More information about the R-help mailing list