F Raziq, Here's a little something to get you started. For ease of viewing, I set P = 10 and n = 5 (instead of 100 and 50), but this can easily be changed. You don't say what your original data looks like, so I assumed it was zeroes and ones to start with. I show an example of a single bootstrap sample. You say you wanted 100 iterations, but you didn't specify how you want to store the results. So, take this code as far as you can, and post any follow up questions to R-help.
Jean # create example data representative of your gene variables P <- 10 n <- 5 m <- matrix(sample(0:1, P*n, replace=TRUE), ncol=P) # take a single bootstrap sample boot <- sample(seq(n), replace=TRUE) m[boot, ] On Fri, Jun 14, 2013 at 5:24 AM, Fazli Raziq <raziq_fa...@yahoo.com> wrote: > Hello, > > Suppose, I have P = 100 genes variables and each consists of n = 50 values. > Now I want to Bootstrap (With Replacement) 50 times and 100 iterations. > I want P in columns and Bootstrap iterations in Rows. > Also, when genes are selected in Bootstrap (WR) give it value "1", if not > selected "0". > > I want a matrix of ones and zero's for the above. > Thanks in Advance. > > Best Regards > F Raziq > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. > [[alternative HTML version deleted]] ______________________________________________ R-help@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.