From maechler@stat.math.ethz.ch  Tue Oct  3 18:09:33 2000
From: maechler@stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Tue, 3 Oct 2000 19:09:33 +0200 (MET DST)
Subject: [Rd] This mail was found after problem with mailserver Oct 3rd - postmaster@hh.umu.se (PR#681)
Message-ID: <200010031709.TAA02504@pubhealth.ku.dk>

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

>>>>> "david" == david  <david@orion-10.cs.byu.edu> writes:
    david> When I issue the command: if ( c(2.8,3)[1] < pretty
    david> (c(2.8,3))[1]) print ("problem")

    david> the result is "problem" prints.  I have traced it to bits and
    david> the 2.8 of the returned vector from pretty is slightly larger.
    david> This seems to be due to the conversion to base 10 with the ns
    david> and unit variables in src/appl/pretty.c.

    david> Anyway if I do something like: hist(c(2.8,3)) it fails as well
    david> because it uses pretty.

    david> Thanks for you attention, DavidMcLaughlin@byu.edu

    MM> Thank you for the bug report.  This bug is ``new'' (a bit more than
    MM> a year!) and was introduced when someone fixed another problem in
    MM> pretty.c by adding "1e-5" fuzz a bit too generously hmm,.......
    MM> I'll have a look.

    david> Version: .... R 1.1.1 ...

Ok, I've fixed pretty() for the development version
such that
     p <- pretty(x)
     all(p[1] <= x & x <= p[2])

should be guaranteed (again).

Note however, that this really also changes some "results",
that may be unexpected,
e.g.

    R 1.1.1 :
    ---------

    > data(women); (hT <- hist(women$weight, nc= 7, plot = FALSE))[2]

    $counts
     [1] 3 1 2 2 1 1 2 1 1 1

    --------------

    R-devel [to be 1.2.0]:
    ---------------------

    > data(women); (hT <- hist(women$weight, nc= 7, plot = FALSE))[2]

    $counts
     [1] 2 2 2 1 2 1 2 1 1 1

    > 

------

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

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] This mail was found after problem with mailserver Oct 3rd - postmaster@hh.umu.se (PR#681)
maechler@stat.math.ethz.ch