[R] Incorrectness of mean()
zbynek.janoska@gmail.com
zbynek.janoska at centrum.cz
Mon Feb 28 11:07:27 CET 2011
I have found following problem:
I have a vector:
> a <- c(1.04,1.04,1.05,1.04,1.04)
I want a mean of this vector:
> mean(a)
[1] 1.042
which is correct, but:
> mean(1.04,1.04,1.05,1.04,1.04)
[1] 1.04
gives an incorrect value.
how is this possible?
thanks,
zbynek
--
View this message in context: http://r.789695.n4.nabble.com/Incorrectness-of-mean-tp3327701p3327701.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list