From tobias.verbeke at telenet.be  Wed Jan 19 21:35:59 2005
From: tobias.verbeke at telenet.be (tobias.verbeke@telenet.be)
Date: Wed Jan 19 21:36:02 2005
Subject: [Rd] ppoints (PR#7538)
Message-ID: <20050119203559.9AAF010FAB@slim.kubism.ku.dk>

Dear r-bugs,

Whilst playing with ppoints I discovered
that when one uses it directly, occasional
NA's in a vector also become data fractions:

ppoints(c(1,2,NA,4))

Would it be a good idea to add a warning message 
as in:

ppoints <- function (n, a = ifelse(n <= 10, 3/8, 1/2))
{
    if(any(is.na(n))) warning("'n' contains NA's")
    if(length(n) > 1) n <- length(n)
    if(n > 0)
        (1:n - a)/(n + 1-2*a)
    else numeric(0)
}

Another minor remark concerning ?ppoints. It says:

n: either the number of points generate or a vector of
          observations.     ^^^^^

Best regards,
Tobias


[Rd] ppoints (PR#7538)
tobias.verbeke@telenet.be