The R Project SVN R

Rev

Rev 13792 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13792 Rev 13800
Line 38... Line 38...
38
\seealso{
38
\seealso{
39
  \code{\link{fivenum}}, \code{\link{boxplot}}, \code{\link{bxp}}.
39
  \code{\link{fivenum}}, \code{\link{boxplot}}, \code{\link{bxp}}.
40
}
40
}
41
\examples{
41
\examples{
42
x <- c(1:100, 1000)
42
x <- c(1:100, 1000)
43
str(boxplot.stats(x))
43
str(b1 <- boxplot.stats(x))
44
str(boxplot.stats(x, do.conf=FALSE, do.out=FALSE))
44
str(b2 <- boxplot.stats(x, do.conf=FALSE, do.out=FALSE))
-
 
45
stopifnot(b1 $ stats == b2 $ stats) # do.out=F is still robust
45
str(boxplot.stats(x, coef = 3, do.conf=FALSE))
46
str(boxplot.stats(x, coef = 3, do.conf=FALSE))
46
## no outlier treatment:
47
## no outlier treatment:
47
r <- boxplot.stats(x, coef = 0)
48
str(boxplot.stats(x, coef = 0))
48
stopifnot(all.equal(r, boxplot.stats(x, do.out = FALSE)),
-
 
49
          range(r$ stats) == range(x))
-
 
50
 
49
 
51
str(boxplot.stats(c(x, NA)))
50
str(boxplot.stats(c(x, NA))) # slight change : n + 1
52
str(r <- boxplot.stats(c(x, -1:1/0)))
51
str(r <- boxplot.stats(c(x, -1:1/0)))
53
stopifnot(r$out == c(1000, -Inf, Inf))
52
stopifnot(r$out == c(1000, -Inf, Inf))
54
}
53
}
55
\keyword{dplot}
54
\keyword{dplot}