Could somone show me How I perform a chi square test in R on 40,00 SNPs data?
Aside from that, we'd need to know more details (e.g., what's your data look like) to give you any further help.
One data contains 50000 SNPS with positions and other set of data with outcomes of drug resistance ( resistant or sensitive) . I want to do basic chi square test for each of these SNPS in R.
So you want to evaluate for the association of each SNP with drug resistance or sensitivity? What is your null hypothesis? That a given SNP is not associated with resistance? I think you need to be still more detailed. Is your question about chi-squared and how to frame your hypothesis, organize your data, or is your question about the R syntax? What have you tried?