[R] summary and logical

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Oct 3 11:20:21 CEST 2002


Göran Broström <gb at stat.umu.se> writes:

> In R-1.6.0 (Linux) I notice that 'summary' on a data.frame doesn't treat
> logicals nicely. I only get
> 
>     event
>  Length:148939
>  Mode  :logical
> 
> Is this a bug? (I expected frequencies for TRUE and FALSE, of course.)

Not a bug, but a fairly obviously missing feature... Logicals used to
be automatically converted to factors so it wasn't noticed earlier. 

Looks like a one-line change to summary.default, so we might just be
convinced to put it in for 1.6.1, even if it's not strictly a bug.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list