[R] R: mean from list

2006-02-12 Thread statistical . model
great!! thanks very much, mean(unlist(lapply(listdata, function(z) z$c))) works well. and what about getting the average table $a (displaying the average elements across all 1000 matrix)? could you please help me? I am struggling with this... thanks in advance Roberto mean(unlist(lapply(x,

Re: [R] R: mean from list

2006-02-12 Thread Kjetil Brinchmann Halvorsen
[EMAIL PROTECTED] wrote: great!! thanks very much, mean(unlist(lapply(listdata, function(z) z$c))) WHY unlist(lapply(... when sapply(... is simpler? Kjetil works well. and what about getting the average table $a (displaying the average elements across all 1000 matrix)? could you please

Re: [R] R: mean from list

2006-02-12 Thread Rajarshi Guha
On Sun, 2006-02-12 at 19:21 -0400, Kjetil Brinchmann Halvorsen wrote: [EMAIL PROTECTED] wrote: great!! thanks very much, mean(unlist(lapply(listdata, function(z) z$c))) WHY unlist(lapply(... when sapply(... is simpler? Aah! Immediately after sending it I realized the simpler form :-/