[R] Bar Chart help!

john.hogan john.hogan4 at yahoo.co.uk
Tue Apr 22 16:35:40 CEST 2008


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.



More information about the R-help mailing list