Herbejie Rose, You could use the boot() function in the R package boot. For example:
# example data matrix m <- matrix(sample(11*10), ncol=10) # function to calculate column means for indexed rows of matrix myfun <- function(data, i) { apply(data[i, ], 2, mean) } # 1000 bootstrap samples library(boot) myboot <- boot(m, myfun, R=1000) myboot dim(myboot$t) Jean On Tue, Apr 23, 2013 at 10:41 AM, Herbejie Rose Cuizon < herbejier...@gmail.com> wrote: > Good evening! This is Herbejie Rose > > I need your help for me to compute the following: > > I just want to ask on how to bootstrap a 11x10 matrix to obtain 1000 > bootstrap samples and compute the 10 dimensional mean per bootstrap sample. > the 11x10 dimension of the matrix has 11 subjects and 10 variables. Just > want to have 11x10 per bootrap sample with replacement and compute the 10 > dimensional mean. > > > Hope to have a positive response on this matter.. > > > Thank you so much. > > > > Sincerely yours, > > > Herbejie Rose > > [[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.