I have to perform a chi-square test on this given data set:
Upon doing so with the following code:
I get the following result:
Pearson's Chi-squared test
data: data.table
X-squared = NaN, df = 44, p-value = NA
Warning message:
In chisq.test(data.table) : Chi-squared approximation may be incorrect
Why is the X-squared value "NaN" and the p-value "N/A"? What am I doing wrong here?