Re: [R] combing list objects

2012-09-03 Thread Rui Barradas
Hello, Try ?unlist. unlist(abun) Hope this helps, Rui Barradas Em 03-09-2012 17:06, chris20 escreveu: Hi, I am trying to combine a long list but I can't work out how to do it, for example: abun<-list(rep(0,5),rep(0,7),rep(0,4),rep(0,10)) nb<-c(5,5,1,8) fill.abun <- function(x, y) {

[R] combing list objects

2012-09-03 Thread chris20
Hi, I am trying to combine a long list but I can't work out how to do it, for example: abun<-list(rep(0,5),rep(0,7),rep(0,4),rep(0,10)) nb<-c(5,5,1,8) fill.abun <- function(x, y) { set <- sample(1:length(x), size = y) x[set] <- rlnorm(length(set)) return(x) }