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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to