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

From: Berton Gunter <gunter.berton_at_gene.com>
Date: Wed 01 Jun 2005 - 08:40:51 EST


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.

"The business of the statistician is to catalyze the scientific learning process." - George E. P. Box    

> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Earl F. Glynn
> Sent: Tuesday, May 31, 2005 3:14 PM
> To: r-help@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@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
>



R-help@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 Received on Wed Jun 01 08:49:11 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:17 EST