Error message with Pearson's chi-squared test  > dput(t)
 structure(c(125L, 25L, 28L, 8L, 0L, 68L, 13L, 9L, 10L, 0L), .Dim = c(5L, 
 2L), .Dimnames = list(c("Married", "Widowed", "Divorced", "Never married", 
 "Other"), c("control", "case")))
 > t
               control case
 Married           125   68
 Widowed            25   13
 Divorced           28    9
 Never married       8   10
 Other               0    0
 > chisq.test(t)
    Pearson's Chi-squared test

 data:  t
 X-squared = NaN, df = 4, p-value = NA

 Warning messages:
 1: In chisq.test(t, simulate.p.value = TRUE) :
   cannot compute simulated p-value with zero marginals
 2: In chisq.test(t, simulate.p.value = TRUE) :
   Chi-squared approximation may be incorrect

I am trying to see whether marital status affects a person's disease status. However, when I run the Pearson test, I get the above errors. Is this happening because I only have 2 categories for the disease status (i.e: control or case)? What is another appropriate test that I can use instead?
 A: This is not specific to R and in fact you are being told what is wrong. To spell it out, two of the terms in the chi-square statistic, 
$\Sigma (\text{observed} - \text{expected})^2 / \text{expected}$ 
reduce to $(0 - 0)^2/0$, as the total of a row or column (depending on how the frequencies are displayed) is $0$. That is what is meant by "zero marginal". You could see this for yourself by doing the chi-square test by hand, but regardless of that the R function won't sum (or ignore) indeterminate terms with zero divisor. 
Having two categories for disease status is irrelevant to that outcome, except that you need at least two categories to apply the test at all.  
The easiest solution is to omit the corresponding category. I'd counsel flagging that you did so in any formal report. There are various obvious consequences: if other researchers had a populated "other" category, then what you are doing is necessarily not quite the same as what they did. Presumably "other"s are possible in principle, just not present in your sample. (In this case, I can't readily imagine what that other would be, but perhaps it is there for people writing in something else or declining to give an answer.) 
