Dear R-help, Hi I've got data table with variation and freqeuncy. I don't know how to get mean and sd. Please help me. Cheers. =========variation frequency 0.503 79930 0.174 291140 -0.444 95916 -0.731 11451 0.453 102899 0.596 46133 -0.295 204859 0.013 390121 0.311 187552 -0.085 378902 -0.633 28164 0.175 291411 0.611 41903 0.318 183254 -0.661 22580 0.149 312574 0.594 46903 -0.557 47839 -0.451 92145 0.225 252013 0.870 3731 -0.552 50048 -0.786 4997 -0.445 95784 -0.501 68721 -0.284 214963 ======== -- Won Cheol Yim, MSc. Doctoral student Plant molecular genetics lab. Dept. of plant biotechnology Graduate School Dongguk University Korea Rep. Contact Cell : +82 10 3853 3926 VoIP : +82 70 8226 3853 Email : ascendo@dongguk.edu Curriculum Vitae : http://ascendo.u.googlepages.com/ Lab page : http://pmgl.dongguk.edu/ fly. [[alternative HTML version deleted]]
Well, it depends on what mean and sd do you want to calculate. If it's the mean of the variation or frequency mean and sd from the showed variables, you should do:> mean(variation) > sd(variation) > mean(frequency) > sd(frequency)However, if you want to calculate the mean of variation, taking into account the frequency it has, i.e., a weighted mean, then you should do:> weighted.mean(variation,frequency)HTH, Joao Daniel -- View this message in context: http://r.789695.n4.nabble.com/Standard-deviation-and-Mean-tp3597521p3597628.html Sent from the R help mailing list archive at Nabble.com.
Hi, pick up any introductory manual of which there are many online. It so happens that the functions for mean and sd are called mean() and sd(). If you want to know how to use them type ?mean or ?sd in the R-prompt and hit enter. Daniel -- View this message in context: http://r.789695.n4.nabble.com/Standard-deviation-and-Mean-tp3597521p3597734.html Sent from the R help mailing list archive at Nabble.com.