[Rd] fivenum (PR#4586)

r.huggins at latrobe.edu.au r.huggins at latrobe.edu.au
Wed Oct 15 01:20:04 MEST 2003


Full_Name: Richard Huggins
Version: 1.7.1
OS: windows 2000
Submission from: (NULL) (131.172.4.44)


> x<-rnorm(100,2,1)
> mean(x)
[1] 1.73299
> summary(fivenum(x))
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.3655  1.1070  1.7430  1.7320  2.3840  3.7910 
> summary(x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.3655  1.1070  1.7430  1.7330  2.3830  3.7910 
> y<-log(abs(x))
> summary(fivenum(y))
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-3.5950  0.1020  0.5555 -0.1472  0.8688  1.3330 
> mean(y)
[1] 0.2878568
> summary(y)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-3.5950  0.1021  0.5555  0.2879  0.8683  1.3330 


summary(fivenum(x)) gives the wrong mean



More information about the R-devel mailing list