The R Project SVN R

Rev

Rev 61153 | Rev 75488 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61153 Rev 61168
Line 123... Line 123...
123
  Wadsworth & Brooks/Cole.
123
  Wadsworth & Brooks/Cole.
124
}
124
}
125
\examples{
125
\examples{
126
require(stats)
126
require(stats)
127
set.seed(753)
127
set.seed(753)
128
(bx.p <- boxplot(split(rt(100, 4), gl(5,20))))
128
(bx.p <- boxplot(split(rt(100, 4), gl(5, 20))))
129
op <- par(mfrow =  c(2,2))
129
op <- par(mfrow =  c(2, 2))
130
bxp(bx.p, xaxt = "n")
130
bxp(bx.p, xaxt = "n")
131
bxp(bx.p, notch = TRUE, axes = FALSE, pch = 4, boxfill = 1:5)
131
bxp(bx.p, notch = TRUE, axes = FALSE, pch = 4, boxfill = 1:5)
132
bxp(bx.p, notch = TRUE, boxfill = "lightblue", frame = FALSE,
132
bxp(bx.p, notch = TRUE, boxfill = "lightblue", frame = FALSE,
133
    outl = FALSE, main = "bxp(*, frame= FALSE, outl= FALSE)")
133
    outl = FALSE, main = "bxp(*, frame= FALSE, outl= FALSE)")
134
bxp(bx.p, notch = TRUE, boxfill = "lightblue", border = 2:6,
134
bxp(bx.p, notch = TRUE, boxfill = "lightblue", border = 2:6,
135
    ylim = c(-4,4), pch = 22, bg = "green", log = "x",
135
    ylim = c(-4,4), pch = 22, bg = "green", log = "x",
136
    main = "... log='x', ylim=*")
136
    main = "... log = 'x', ylim = *")
137
par(op)
137
par(op)
138
op <- par(mfrow= c(1,2))
138
op <- par(mfrow = c(1, 2))
139
 
139
 
140
## single group -- no label
140
## single group -- no label
141
boxplot (weight ~ group, data = PlantGrowth, subset = group == "ctrl")
141
boxplot (weight ~ group, data = PlantGrowth, subset = group == "ctrl")
142
## with label
142
## with label
143
bx <- boxplot(weight ~ group, data = PlantGrowth,
143
bx <- boxplot(weight ~ group, data = PlantGrowth,
144
              subset = group == "ctrl", plot = FALSE)
144
              subset = group == "ctrl", plot = FALSE)
145
bxp(bx,show.names=TRUE)
145
bxp(bx, show.names=TRUE)
146
par(op)
146
par(op)
147
 
147
 
148
%% examples for new (S+ like) features
148
%% examples for new (S+ like) features
149
z <- split(rnorm(1000), rpois(1000, 2.2))
149
z <- split(rnorm(1000), rpois(1000, 2.2))
150
boxplot(z, whisklty = 3, main = "boxplot(z, whisklty = 3)")
150
boxplot(z, whisklty = 3, main = "boxplot(z, whisklty = 3)")