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)
Dear All,
I am facing the task to extract data from array to table. here an example
of array.
##Get A list of Matrices with unequal rows
Disease <- NULL
Diseases <- NULL
ListMatByGene <- NULL
for(i in 1:3){
Disease[[i]] <-matrix(sample(-30:30,25+(5*
i)),5+i)
rownames(Disease[[i]]) <- paste0("Sam
3 matches
Mail list logo