[R] Boxplot in order
Dennis Murphy
djmuser at gmail.com
Thu May 5 19:07:56 CEST 2011
Hi:
Try this:
karla = data.frame(
Groups = factor(rep(c('CPre','SPre','C7','S7','C14','S14','C21','S21'), 11),
levels =
c('CPre','SPre','C7','S7','C14','S14','C21','S21')),
Time = rep(c(0,7,14,21), 11),
Resp = rnorm(88)
)
boxplot(Resp~Groups, data = karla)
Since you didn't have a variable valor defined, I substituted in
random normal deviates.
HTH,
Dennis
On Thu, May 5, 2011 at 7:41 AM, Silvano <silvano at uel.br> wrote:
> Hi,
>
> I need construct box plot graph, but I want keep Groups order
>
> karla = data.frame(
> Groups = factor(rep(c('CPre','SPre','C7','S7','C14','S14','C21','S21'),
> 11)),
> Time = rep(c(0,7,14,21), 11),
> Resp = valor
> )
>
> boxplot(Resp~Groups, order=T)
>
> doesn't work.
>
> How do this?
>
> --------------------------------------
> Silvano Cesar da Costa
> Departamento de Estatística
> Universidade Estadual de Londrina
> Fone: 3371-4346
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list