i need your help with a barplot in R.
I have a data frame called "answers", it is something like this:
v0= Chicago, Miami,Orlando, New York, (50 cities more)
v1= employee, Unemployed, looking for a job
.
I need help with a barplot, I'm doing this:
for my first column
a1=answers[,c("v0")]
b1=table(a1)
For my second column
a2=answers[,c("v1")]
}b2=table(a2)
Then i match both tables in just one:
d=table(a2,b2)
d1=prop.table(d, margin=2)
d2=percent(d1,digits = 3)
the result show me the number of person employees, unemployees and looking for a job in each city.
Finally i make a barplot:
graph=barplot((d2),las=1,beside=T, horiz=F,ces.names=1.5,col=..........)
My question is:
How can I delete one or more options from V2, that means just make a barplot about the results for "employee" and "nonemployee" and remove "looking for a job"
Thanks.