[R] Why does "summary" show number of NAs as non-integer?

Berton Gunter gunter.berton at gene.com
Wed Jun 1 00:40:51 CEST 2005


summary() is an S3 generic that for your vector dispatches
summary.default(). The output of summary default has class "table" and so
calls print.table (print is another S3 generic). Look at the code of
print.table() to see how it formats the output.

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box
 
 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Earl F. Glynn
> Sent: Tuesday, May 31, 2005 3:14 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Why does "summary" show number of NAs as non-integer?
> 
> Example:
> 
> > set.seed(19)
> > summary( c(NA, runif(10,1,100), NaN) )
>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's
>   7.771  24.850  43.040  43.940  63.540  83.830   2.000
> 
> Why isn't the number of NA's just "2" instead of the "2.000" 
> shown above?
> 
> efg
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list