[R] two sample chi-squared test

eric lee ericlee100 at gmail.com
Fri Jan 29 17:11:52 CET 2010


Hello,

Can you tell me what R function to use to do a two-sample chi-squared
test?  I want to see if two distributions are significantly different
from each other, and I don't specify the theoretical distribution of
either.  For example, I have the following fake count data:

x <- sample(1:10,50,replace=TRUE)
y <- sample(1:10,100,replace=TRUE)

I saw chisq.test in the stats package, but that looks like a
one-sample test.  I'm running version 2.7.2 on windows xp.  Thanks.

eric



More information about the R-help mailing list