I was having trouble interpreting the error message
Error in stats::prop.test(t(table_from_formula), p = p, conf.level = conf.level, :
'x' must have 2 columns
but this old issue made it clear that it occurs when one or more of your variables has more than two categories. It turns out that my data has more then two categories because it is a factor with two levels... plus NA. Here's a reprex:
prop.test(anysub~sex, data=HELPrct)
What is the recommended way to deal with this in mosaic?
I was having trouble interpreting the error message
but this old issue made it clear that it occurs when one or more of your variables has more than two categories. It turns out that my data has more then two categories because it is a factor with two levels... plus
NA. Here's a reprex:What is the recommended way to deal with this in
mosaic?