Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] Barplot - Can't figure it out

T Petersen

2005-02-18

Replies:

Hi,

I have two catagorical vectors like this;

x = c(1, 2, 4, 2, 1)
y = c(2, 4, 2 ,4, 1)

I want to set up a barplot with the catagories 1-4 horizontally and
number of occurances vertically for each vector x,y. I've tried

boxplot(table(x,y), beside=T)

and

boxplot(c(x,y), beside=T)

among others, but can't get it to work...Any ideas? I'd apppreciate any help

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.