df <- data.frame(
cola = c('1',NA,'c','1','1','e','1',NA,'c','d'),
colb = c("a",NA,"c","d",'a','b','c','d','c','d'),
colc = c('a',NA,'1','d','a',NA,'c',NA,'c','d'),stringsAsFactors = TRUE)
table(df$cola)
Output of above R script is:
1 c d e
4 2 1 1
We can use geom_bar(stat = "identity"...,
in ggplot
to plot bar like:
How to use ggplot geom_bar with facet_wrap
to one-time plot cola
,colb
,colc
as below?