[Rd] 'summary' with logicals (PR#2629)

maechler at stat.math.ethz.ch maechler at stat.math.ethz.ch
Thu Mar 13 18:00:08 MET 2003


>>>>> "GB" == Göran Broström <gb at stat.umu.se>
>>>>>     on Wed, 12 Mar 2003 23:32:16 +0100 (MET) writes:

    GB> Consider
    >> oj <- data.frame(x = c(TRUE, FALSE, NA))
    >> oj
    GB> x
    GB> 1  TRUE
    GB> 2 FALSE
    GB> 3    NA
    >> summary(oj)
    GB> x          
    GB> Mode :logical  
    GB> FALSE:1        
    GB> TRUE :1        

    GB> But

    >> oj$x <- factor(oj$x)
    >> summary(oj)
    GB> x    
    GB> FALSE:1  
    GB> TRUE :1  
    GB> NA's :1  

    GB> My point is that NA's should be reported for logicals like they are for 
    GB> other data types.

Agreed.
I'll look into making this happen for 1.7.0
Martin

    GB> Göran
    GB> ---
    GB> Göran Broström                    tel: +46 90 786 5223
    GB> Department of Statistics          fax: +46 90 786 6614
    GB> Umeå University                   http://www.stat.umu.se/egna/gb/
    GB> SE-90187 Umeå, Sweden             e-mail: gb at stat.umu.se

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><



More information about the R-devel mailing list