Re: [R] R function for percentrank

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Thu, 6 Dec 2007 12:11:46 +0100

>>>>> "MS" == Marc Schwartz <marc_schwartz@comcast.net>
>>>>> on Wed, 05 Dec 2007 12:43:50 -0600 writes:

[............]

    MS> Martin,

    MS> Thanks for the corrections. In hindsight, now seeing the intended use of
    MS> ecdf() in the fashion you describe above, it is now clear that my
    MS> approach in response to David's query was un-needed and "over the top".
    MS> "Yuck" is quite appropriate... :-)

    MS> As I was going through this "exercise", it did seem overly complicated,
    MS> given R's usual elegant philosophy about such things. I suppose if I had
    MS> looked at the source for plot.stepfun(), it would have been more evident     MS> as to how the y values are acquired.
    MS> In reviewing the examples in ?ecdf, I think that an example using
    MS> something along the lines of the discussion here more explicitly, would
    MS> be helpful. It is not crystal clear from the examples, that one can use
    MS> ecdf() in this fashion, though the use of "12 * Fn(tt)" hints at it.

    MS> Perhaps:

    MS> ##-- Simple didactical  ecdf  example:
    MS> x <- rnorm(12)
    MS> Fn <- ecdf(x)
    MS> Fn
    MS> Fn(x)  # returns the percentiles for x
    MS> ...

Thank you, Marc for the above proposal, to make the examples more "crystal clear" :-)
I've now amended the R-devel version of help(ecdf) accordingly.

    MS> Thanks again Martin and no offense taken... :-)

I'm glad. You're welcome!
Martin



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 06 Dec 2007 - 11:15:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 06 Dec 2007 - 13:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.