Re: [R] How to produce this graphic

From: Kort, Eric <Eric.Kort_at_vai.org>
Date: Thu 05 Jan 2006 - 06:27:57 EST

Lisa Wang asks...
> Subject: [R] How to produce this graphic
>
> Hello there,
>
> I would like to produce a plot of x<-c(4,5,6),which is the mean of
each
> group and y<-c('groupA','groupB','groupC').
>
> plot (x,y) can not produce any graphics because y is not numerical.
>
> What should I do to produce this graphic?
>

One possibility:
x <- c(4,5,6)
plot(x, axes=F)
axis(1, c(1:3), labels=y)

or see ?bar.plot

-Eric

>
> Thank you in advance
>
> Lisa Wang
> Princess Margaret Hospital
> Toronto,Ca
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-
> guide.html
This email message, including any attachments, is for the so...{{dropped}}



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Jan 05 07:40:34 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:50 EST