Dear everyone I am a bit of a computer imbecile and are having problems with R. I am using R in my research project to do chi-square tests on data imported from excel . However I have som missing data in one of my variables (columns) and I need R to "exclude" these and make chi-square test on the data that I have.
I use a formula to make 2x2 tables which is: data <- matrix(c(sum(!Variable[Group....==1]), sum(Variable[DAAC....==1]), sum(!Variable[Group....==0]), sum(Variable[DAAC....==0])),2,2) How can I get R to ignore Na's in this formula? Many Regards -- View this message in context: http://r.789695.n4.nabble.com/Missing-data-Na-and-chi-square-tests-tp4645167.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.