[R] creating lists of random matrices
evan.cooch at gmail.com
Wed Nov 9 20:12:48 CET 2016
>> See ?replicate
>> ## 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]]
More information about the R-help