Displaying 1 result from an estimated 1 matches for "statslist".
Did you mean:
statalist
2010 Feb 23
2
Lists into matrices within lists...again
Related questions to this have been asked before, but I have tried all
options they gave me unsuccessfully (do.call and unlist).
I start with three lists of summary statistics, 100 elements each, which I
bind together:
statslist <- as.data.frame(cbind (means, vars, mcrs))
I then take 100 samples of this data frame of varying lengths:
stats <- lapply (1:100, function (dummy) {
statslist[sample(nrow(statslist), (sample (10:20, 1, replace = TRUE)),
replace = TRUE),]})
It returns basically what I want:
> stats[[i]...