>> >> Hi, >> >> See ?replicate >> >> Example: >> >> ## Create a list of 5 2x2 matrices > > > Sorry, correction on my reply. > > I copied the wrong output, It should be: > > > replicate(5, matrix(rnorm(4), 2, 2), simplify = FALSE) >
Perfect does the trick. Thanks also for the lapply solutions from others. The replicate approach is more 'transparent' at least to me. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.