[R] Mann-Whitney by group
R. Michael Weylandt <michael.weylandt@gmail.com>
michael.weylandt at gmail.com
Wed Jul 11 00:13:49 CEST 2012
Untested, I think you need to lapply() over thing with some sort of extractor:
lapply(thing, function(x) x[['p.value']])
Michael
On Jul 10, 2012, at 3:45 PM, Oxenstierna <david.chertudi at gmail.com> wrote:
> This works very well--thanks so much.
>
> By way of extension: how would one extract elements from the result object?
>
> For example:
>
> thing<=apply(Dtb[,3:10], 2, function(x) wilcox.test(x~Dtb$Group))
>
> summary(thing)$p.value
>
> Does not provide a list of p-values as it would in a regression object.
> Ideally, I would like to be able to extract the W score and p-value by
> A,B,C,...
>
> Any ideas greatly appreciated!
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Mann-Whitney-by-group-tp4635618p4636055.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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