ANOVA and Chi-square Tests in R