Tobias,
I'm not sure if this is what you're after, but perhaps it will help.
# create a list of 5 vectors
n <- 5
subsets <- lapply(1:n, function(x) rnorm(5, mean=80, sd=1))
# create another list that takes 2 bootstrap samples from each of the 5
vectors and puts them in a matrix
nbootstrap <- 2
t
Dear R experts,
I am trying to simulate a list containing data matrices. Unfortunately, I don't
manage to get it to work.
A small example:
n=5
nbootstrap=2
subsets<-list()
for (i in 1:n){
subsets[[i]] <- rnorm(5, mean=80, sd=1)
for (j in 1:nbootstrap){
test<-list()
2 matches
Mail list logo