[R] calculating mean for samples

Alex99 loyola9988 at yahoo.com
Mon Oct 20 19:53:16 CEST 2008


Hi everyone,
> does any one knows how can I calculate mean for different samples
> i.e. I have a data like this:
>
>  s1 s2 s3 s4
> 1   0  0  0  1
> 2   1  0  1  0
> 3   0  0  0  0
> 4   0  0  0  0
> 5   0  1  0  1
> 6   1  0  0  0
> 7   0  0  0  0
> 8   0  0  0  0
> 9   0  0  0  0
> 10  0  0  0  1
>
> I need to make 5 different sample with 5 different persons(rows) in each
> sample from it keeping s1,s3,s3,s4 but changing rows. and then calculate
> the mean for each "S" in each sample. and finally calculate the grand
> mean,which is the mean of means for each sample. i.e. if I sample 5 time I
> get 5 different means for s1, s2, s3, s4. then I need to add all five
> means for and divide it by 5.(of course I have to do it for s1,s2,s3,s4
> separately) 
-- 
View this message in context: http://www.nabble.com/calculating-mean-for-samples-tp20075174p20075174.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list