Re: [R] Subset results of tapply

From: <>
Date: Thu, 7 Feb 2008 13:16:44 +0000

> I would like to extract only p.value by performing wilcox.test with
> tapply function.

> > tapply(tmp$pc, tmp$name, wilcox.test)
> How can I extract only p.values of above command?

Try this:

wilcoxp <- function(x, ...)

    y <- wilcox.test(x, ...)
tapply(tmp$pc, tmp$name, wilcoxp)


Mathematical Sciences Unit

ATTENTION: This message contains privileged and confidential inform...{{dropped:20}} mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 07 Feb 2008 - 13:18:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 07 Feb 2008 - 14:00:13 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive