这是我正在使用的代码,在 Rstudio 中运行良好
a1 <- matrix(c(1601, 162527, 510, 412368), nrow=2, byrow=T)
chisq.test(a1, correct=F)
这是我得到的错误
! Undefined control sequence.
<argument> ^^M##^^M## Pearson'
s Chi-squared test^^M##^^M## data: a1^^M## X...
l.356 \end{verbatim}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
如果我这样做会起作用
c1 <- chisq.test(a1, correct=F)
然后使用
c1$p.value
是什么导致了这个问题?