The R Project SVN R

Rev

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

Rev 25118 Rev 26000
Line 75... Line 75...
75
str(boxplot.stats(c(x, NA))) # slight change : n + 1
75
str(boxplot.stats(c(x, NA))) # slight change : n + 1
76
str(r <- boxplot.stats(c(x, -1:1/0)))
76
str(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
\testonly{
80
\dontshow{
81
 ## Difference between quartiles and hinges :
81
 ## Difference between quartiles and hinges :
82
 nn <- 1:17 ;  n4 <- nn \%\% 4
82
 nn <- 1:17 ;  n4 <- nn \%\% 4
83
 hin <- sapply(sapply(nn, seq), function(x) boxplot.stats(x)$stats[c(2,4)])
83
 hin <- sapply(sapply(nn, seq), function(x) boxplot.stats(x)$stats[c(2,4)])
84
 q13 <- sapply(sapply(nn, seq), quantile, probs = c(1,3)/4, names = FALSE)
84
 q13 <- sapply(sapply(nn, seq), quantile, probs = c(1,3)/4, names = FALSE)
85
 m <- t(rbind(q13,hin))[, c(1,3,2,4)]
85
 m <- t(rbind(q13,hin))[, c(1,3,2,4)]