[Rd] bug in CrossTable (package:gregmisc) (PR#2480)

Marc Schwartz mschwartz@medanalytics.com
Wed Jan 22 05:23:02 2003


> -----Original Message-----
> From: r-devel-admin@stat.math.ethz.ch 
> [mailto:r-devel-admin@stat.math.ethz.ch] On Behalf Of 
> John_Hendrickx@yahoo.com
> Sent: Tuesday, January 21, 2003 6:51 AM
> To: r-devel@stat.math.ethz.ch
> Cc: R-bugs@biostat.ku.dk
> Subject: [Rd] bug in CrossTable (package:gregmisc) (PR#2480)
> 
> 
> 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)

John,

Thank you for bringing this to my attention. I was out of town all day
on a business trip and will look at this issue further with fresh eyes
in the morning. I'll get an update to Greg as soon as I have a chance
to incorporate a fix.  I also have some pending updates for
barplot2(), so I will coordinate the updates with Greg to conserve his
time.

Best regards,

Marc Schwartz