[R] Help: "mean" and "replicate"

Alex99 loyola9988 at yahoo.com
Fri Nov 28 17:51:21 CET 2008


Hi all,

I used the "replicate" function to make 2 samples from file "test" with 5
records in each sample and saved the output in "result".

result=replicate(2,test[,sample(colnames(test),5,replace
=FALSE)],simplify=FALSE)


now I need to calculate the mean of each cell; i.e. I need to add "the
number in cell 1&1 from sample 1" and "the number in cell 1&1 in sample 2"
and divide it by 2. and do the same for all numbers in two sample( adding   
the number in cell 1&2 from sample 1" and "the number in cell 1&2 in sample
2",.......)

does anyone have any idea how to do it?

Thanks
-- 
View this message in context: http://www.nabble.com/Help%3A-%22mean%22-and-%22replicate%22-tp20737544p20737544.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list