The R Project SVN R

Rev

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

Rev 27625 Rev 27713
Line 63... Line 63...
63
\seealso{
63
\seealso{
64
  \code{\link[stats]{fivenum}}, \code{\link{boxplot}}, \code{\link{bxp}}.
64
  \code{\link[stats]{fivenum}}, \code{\link{boxplot}}, \code{\link{bxp}}.
65
}
65
}
66
\examples{
66
\examples{
67
x <- c(1:100, 1000)
67
x <- c(1:100, 1000)
68
str(b1 <- boxplot.stats(x))
68
(b1 <- boxplot.stats(x))
69
str(b2 <- boxplot.stats(x, do.conf=FALSE, do.out=FALSE))
69
(b2 <- boxplot.stats(x, do.conf=FALSE, do.out=FALSE))
70
stopifnot(b1 $ stats == b2 $ stats) # do.out=F is still robust
70
stopifnot(b1 $ stats == b2 $ stats) # do.out=F is still robust
71
str(boxplot.stats(x, coef = 3, do.conf=FALSE))
71
boxplot.stats(x, coef = 3, do.conf=FALSE)
72
## no outlier treatment:
72
## no outlier treatment:
73
str(boxplot.stats(x, coef = 0))
73
boxplot.stats(x, coef = 0)
74
 
74
 
75
str(boxplot.stats(c(x, NA))) # slight change : n + 1
75
boxplot.stats(c(x, NA)) # slight change : n is 101
76
str(r <- boxplot.stats(c(x, -1:1/0)))
76
(r <- boxplot.stats(c(x, -1:1/0)))
77
stopifnot(r$out == c(1000, -Inf, Inf))
77
stopifnot(r$out == c(1000, -Inf, Inf))
78
 
78
 
79
%% extended example (for the NG of Rdoc):
79
%% extended example (for the NG of Rdoc):
80
\dontshow{
80
\dontshow{
81
 ## Difference between quartiles and hinges :
81
 ## Difference between quartiles and hinges :