From John_Hendrickx@yahoo.com  Tue Jan 21 13:51:03 2003
From: John_Hendrickx@yahoo.com (John_Hendrickx@yahoo.com)
Date: Tue Jan 21 13:51:03 2003
Subject: [Rd] bug in CrossTable (package:gregmisc) (PR#2480)
Message-ID: <200301211251.NAA17691@pubhealth.ku.dk>

Full_Name: John Hendrickx
Version: 1.6.0
OS: Windows 98
Submission from: (NULL) (137.224.174.216)


CrossTable in the "gregmisc" package fails when the fisher.exact test produces
an error (I suspect this is because the number of cases is too large). This can
be fixed using "FTt <- try(fisher.test(t, alternative = "two.sided"))" or by
making the test optional.

bugtab <- array(c(
24,  31,  2,  50,
 4, 101, 16, 130,
 0,  29,  3,  52,
 3,  39, 11, 210))
dim(bugtab)<-c(4,4)
bugtab<-t(bugtab)
rownames(bugtab)<-c("a","b","c","d")
colnames(bugtab)<-c("A","B","C","D")
bugtab

thisworks<-trunc(bugtab/10)
thisworks

library(gregmisc)
# fisher.exact test works fine on small tables
CrossTable(thisworks)
# I suspect the bugtab table is too large
CrossTable(bugtab)



[Rd] bug in CrossTable (package:gregmisc) (PR#2480)
John_Hendrickx@yahoo.com