Hi,
I guess this what your need. I assume your output is 10 by 11 matrix. However, you still need to define your geneset function(?)

result<- list()
output<-matrix(NA, nrow=10, ncol=11)
for(i in 1:length(ncol(output)))
  {
   result[[i]] <- geneset(which(geneset %n% output[1,]))
    }


Chunhao



Quoting Rajasekaramya <[EMAIL PROTECTED]>:


Hi,

Could you please let me know to use a list in a for loop here geneset is a
loop.I am trying to match the names of the list with 1st row of the output.

result<- list()
for(i in 1:length(output)

{
result[[i]] <- geneset(which(geneset %n% output[,1]))
}


Kindly help me out

--
View this message in context: http://www.nabble.com/For-loop-tp18163665p18163665.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[email protected] 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.


______________________________________________
[email protected] 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.

Reply via email to