[R] Saving kruskal wallis p-values

Greg Snow Greg.Snow at imail.org
Wed Oct 22 19:16:19 CEST 2008


Those are the results that print, not what you get.  Try saving the results of the test in an object, then examine the saved object with the str function.  Then reread the section in "An Introduction to R" on extracting pieces of lists.  A reread of the help page for kruskal.test, specifically the Value section, would also be a good idea.

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of lave0083 at umn.edu
> Sent: Wednesday, October 22, 2008 9:18 AM
> To: r-help at r-project.org
> Subject: [R] Saving kruskal wallis p-values
>
> Hi everyone,
>
> I am working on analyzing spectra which requires hundreds of kruskal
> wallis
> tests to be performed. Once significant results are found post tests
> are
> performed ect. My questions are: how do I perform all these kw tests
> and
> save just the pvalues in a table? Is there anyway to have R
> automatically
> perform post tests if a result of p<0.05 is found? Currently when I run
> the
> test for one point on the spectra these are the results I get:
>
> Kruskal-Wallis rank sum test
>
> data:  X175 by treatment
> Kruskal-Wallis chi-squared = 22.9769, df = 9, p-value = 0.006249
>
> Any help on this would be appreciated. I am just trying to streamline
> all
> this analysis.
>
> Thanks
> Candice
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list