[R] Making Sure your matrices are even

Docbanks84 mbanks3 at partners.org
Tue Aug 13 16:42:56 CEST 2013


Thank you David.

I had to sort the data afterwards for it to work:

S<-1:86
B<-1:15
V<-1:45
S2 <- data.frame(Group=rep("S", length(S)), Cat=factor(S))
B2 <- data.frame(Group=rep("B", length(B)), Cat=factor(B))
V2 <- data.frame(Group=rep("V", length(V)), Cat=factor(V))
table(rbind(S2, B2, V2))
y<-table(rbind(S2,B2,V2))
sort.list(y)
chisq.test(table(y))

This resulted in a chisquare of S2 v. B2 v. V2.



--
View this message in context: http://r.789695.n4.nabble.com/Making-Sure-your-matrices-are-even-tp4673598p4673626.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list