On 02/28/2011 11:07 AM, zbynek.jano...@gmail.com wrote:
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?
the x that is averaged is only the first 1.04, the other numbers go into mean's
... argument and are ignored.

Claudia

--
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Università degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste

phone: +39 0 40 5 58-37 68
email: cbelei...@units.it

______________________________________________
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