[R] How to produce this graphic

Robert W. Baer, Ph.D. rbaer at atsu.edu
Thu Jan 5 04:59:20 CET 2006

----- Original Message ----- 
From: "Kort, Eric"  
> 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

I think Eric meant: ?barplot

For example:
barplot(x, names.arg=y)

More information about the R-help mailing list