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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to