[R] Kruskal Walllis test
imrib
bisrael at agri.huji.ac.il
Tue Aug 3 13:47:58 CEST 2010
Hi all
My data table (g) contains a continues data column (plant.height) and other
columns (columns 8 to 57),
each with number of levels of different factors. ANOVA test was done and
the p-values were extracted
as follos:
a <- function(x) anova(lm(plant.height ~ x))$"Pr(>F)"[1]
r<- apply(g[,8:57],2,a)
If I try to do a Kruskal-Wallis test :
kw <- function(x) kruskal.test(plant.height ~ x)$"p.value"
r.kw <- apply(g[,8:57],2,kw)
I get the following error message:
Error in kruskal.test.default(c(0.16, 0, 0.007, 0.078, 0, 0.08, 0.19, :
all group levels must be finite
Why do I get this error ? (the values in c() are the plant.height values)
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/Kruskal-Walllis-test-tp2311712p2311712.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list