I've got this data:
No Yes
Female 411 130
Male 435 124
which was created using the standard table command. Now with plot I can plot this as such:
plot(table(df$gender, df$fraud))
and it then outputs a 2x2 bar chart.
So my question is, how can I do this with ggplot2? Is there any way with out transforming the table-object to a data frame? I would do that, but it becomes a mess and you then need to rename column and row headers and it just becomes a mess for what is really a quite simple thing?