my column in a dataset look like this:
teacher student
y n
y n
y y
y n
y n
n n
n n
n y
y y
n y
y n
I used
barchart(data$teacher)
for a graph for teacher, which shows the frequency of y and n in two separate bars, but now I want to show y and n stacked for both variables, so one bar each variable. I tried many things like chart.StackedBar
but they all didn't work. Thanks for any help!