[R] mean()=sum()

Hannu Kahra (hkahra@sun3.oulu.fi)
Tue, 15 Dec 1998 08:36:37 +0200 (EET)

Date: Tue, 15 Dec 1998 08:36:37 +0200 (EET)
Message-Id: <199812150636.IAA04174@cc.oulu.fi>
To: r-help@stat.math.ethz.ch
From: Hannu Kahra <hkahra@sun3.oulu.fi>
Subject: [R] mean()=sum()

There is a bug (or a feature) in R-0.63.1 such that mean() and sum()
result into identical values in the following example.

> mydata <- read.table("a:\\undata.txt", header=T)
> summary(mydata[2])
UN
Min. : 3.20
1st Qu.: 5.20
Median :13.60
Mean :11.94
3rd Qu.:18.45
Max. :21.80
> mean(mydata[2])
[1] 1707.9
> sum(mydata[2])
[1] 1707.9
>

I have used the bdr0631 Windows version.

Hannu Kahra

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


This archive was generated by hypermail 1.02.