[R] Bar Chart help!

From: john.hogan <john.hogan4_at_yahoo.co.uk>
Date: Tue, 22 Apr 2008 07:35:40 -0700 (PDT)

Hi there,

Im working with a bar chart. I want to create a bar chart using the followinf file:
gender relationship

Male      Manage
Male      Manager
Male      Manager
Male      Manager
Male      Clerical
Male      Manager
Male      Manager
Male      Manager
Male      Manager

Im trying to represent in the chart that there are nine males, 8 are managers and 1 is clerical. I have created a bar chart that shows there are 9 males but my 2nd bar wont display the correct info. It says there are only 2 managers and 2 clerical staff. Here is the code I am using:

female_clerical
<-read.table("C://project/graphs/gender/breakdown/male-relationship.csv", sep=",", header=TRUE)
barp(rbind(rep(length(female_clerical$gender),2),(female_clerical$relationship)[[1]]), col=4:5,names.arg=c("Clerical - 1","Manager - 8")) legend(2.1,8,c("Male (9)","Position"),fill=4:5)

Anyone got any suggestions?

Hope to hear from someone soon.

BR,

John.

-- 
View this message in context: http://www.nabble.com/Bar-Chart-help%21-tp16824435p16824435.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
Received on Tue 22 Apr 2008 - 15:24:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Apr 2008 - 15:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive