Re: R-beta: wish: hist() returning breaks and counts

Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
02 Dec 1997 11:20:09 +0100


To: Martin Maechler <maechler@stat.math.ethz.ch>
Subject: Re: R-beta: wish: hist() returning breaks and counts
From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
Date: 02 Dec 1997 11:20:09 +0100
In-Reply-To: Martin Maechler's message of Tue, 2 Dec 1997 10:38:51 +0100

Martin Maechler <maechler@stat.math.ethz.ch> writes:

> 
> >>>>> Albrecht Gebhardt <agebhard@zidsrv.sci.uni-klu.ac.at> writes:
> 
>     Albrecht> would it be possible to change the hist() function in future
>     Albrecht> R Versions to accept a "plot=F" parameter (like hist() in S
>     Albrecht> it should return a list with "breaks" and "counts" in this
>     Albrecht> case). This change should be very simple.
> 
> it _was_ simple, and has been in the current sources for a while now.
> You'll see it in version 0.60 which should be released `real soon now'.
> 
> > hist(rnorm(50), plot=F)
> $breaks
> [1] -3 -2 -1  0  1  2  3
> 
> $counts
> [1]  1 11 12 20  5  1

Martin: Wouldn't it be better to return

invisible(list(breaks = breaks, counts = counts))

in the plot=T case? (currently it's  invisible(NULL) )
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._