# \donttest{
### compare two-means via anova and t-test
### since they coincide when k=2
x = rnorm(50)
y = rnorm(50)
### run anova and t-test
test1 = usek1d(x, y, "meank.anova")
test2 = mean2.ttest(x,y)
## print the result
cat(paste("\n* Comparison of ANOVA and t-test \n","*\n",
"* p-value from ANOVA : ", round(test1$p.value,5),"\n",
"* t-test : ", round(test2$p.value,5),"\n",sep=""))
# }
Run the code above in your browser using DataLab