Chi square test in R
From Icelandic Parsed Historical Corpus (IcePaHC)
data<-matrix(c(100,200,400,600),ncol=2)
data [will give:]
[,1] [,2]
[1,] 100 400
[2,] 200 600
chisq.test(data,correct=F) [will give:]
X-squared = 4.3333, df = 1, p-value = 0.03737