Plotting a 1-by-1 contingency table returns an error:
dat <- read.table(textConnection('
foo bar
TRUE TRUE
TRUE TRUE
'), header = TRUE, colClasses=c('logical', 'logical'))
mosaicplot(table(dat))
Error in rep.int(0, ydim) : invalid 'times' value
Why?
Follow-up question: How to plot a mosaicplot for a 1x1 contingeny table?