How do I plot a number of categorical variables on a graph in R?
I have about 10 categorical variables - pay1, pay2, ... , pay10 each
having values either 'Yes' or 'No'. I would like to plot the count of each
of these variables on a graph. For example - bar1 on the chart should
refer to the variable 'pay1' reflecting the total number of observations
divided between 'Yes' and 'No'('Yes' on top of 'No' or vice versa) This
scheme should be consistent with all the 10 variables on the chart. If I
am able to display the percentage of 'Yes' and 'No' for each bar, even
better. Would someone be able to help out on this?
TIA.
No comments:
Post a Comment