From Martin Maechler <maechler@stat.math.ethz.ch>  Thu Sep  3 17:29:06 1998
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Thu, 3 Sep 1998 18:29:06 +0200
Subject: ppoints
In-Reply-To: <Pine.OSF.3.95.980903105649.11084A-100000@io.uwinnipeg.ca>
 (message from Bill Simpson on Thu, 3 Sep 1998 10:57:41 -0500 (CDT))
Message-ID: <199809031629.SAA13963@sophie.ethz.ch>

Thank you, Bill, for raising this point!

>>>>> "Bill" == Bill Simpson <wsimpson@uwinnipeg.ca> writes:

    Bill> When I look at ppoints I see:

    Bill> ppoints<-function (x) 
    Bill> {
    Bill> n <- length(x)
    Bill> if (n == 1) 
    Bill> n <- x
    Bill> (1:n - 0.5)/n
    Bill> }

    Bill> However Venables & Ripley (2nd ed, p 165) say ppoints() should return
    Bill> (i-1/2)/n for n>=11; (i-3/8)/(n+1/4) for n<=10.

    Bill> The version below should work as described:

    Bill> ppoints<-function (x) 
    Bill> {
    Bill> n <- length(x)
    Bill> if (n <= 10)
    Bill> (1:n - 0.375)/(n + 0.25) 
    Bill> else
    Bill> (1:n - 0.5)/n
    Bill> }

However, if changing ppoints(.) for compatibility
we should do it properly.

e.g., the case
	ppoints(10)

should give the same as

	ppoints(1:10).

Also,  S has the much nicer extra argument  'a'  with the default

	if(is.null(a))
		a <- if(n > 10) 0.5 else 0.375

which leads to the behavior you cite below.

Maybe the S authors would forgive us we just used S' version ppoints()?
(it's S, not S-plus!)

Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


ppoints
Martin Maechler