The easiest work-around I've found for this problem is to create a vector in
your data frame just using numbers to order them how you want, create a
separate "labeling" data frame with those numbers and corresponding text
labels, and then enter the vector with the grouping names from the labeling
f
Tena koe Eddie
One way:
eddie <- data.frame(grp=rep(c('small','medium','large','very large'), each=20),
wgt=rnorm(80, 100, 10))
with(eddie, plot(grp, wgt))
eddie$grp <- factor(eddie$grp, levels=c('small','medium','large','very large'))
with(eddie, plot(grp, wgt))
HTH ...
Peter Alspach
> -
Hi Eddie,
I've been on a role with the iris data, so I figure why stop.
Assuming that one variable is a factor, you can easily reverse it, and
if you want fine tuned control, then just reorder the levels. Here is
an example:
dat <- iris
boxplot(Sepal.Length ~ Species, data = dat)
boxplot(Sepal.L
3 matches
Mail list logo