Make use of the plyr and reshape2 package (both on CRAN):
library(plyr)
d<-adply(ArrayDiseaseCor, 1:2)
# adply calls function identity by default
d<-melt(d)
d<-subset(d,value>.5)
head(d)
You will have to rename columns, or adjust arguments in melt/adply.
Note: use set.seed before sampling for rep
see inline
On 12 February 2015 at 09:10, Sven E. Templer wrote:
> Make use of the plyr and reshape2 package (both on CRAN):
>
I forgot:
library(reshape2)
> library(plyr)
> d<-adply(ArrayDiseaseCor, 1:2)
> # adply calls function identity by default
> d<-melt(d)
> d<-subset(d,value>.5)
> head(d)
2 matches
Mail list logo