powered by
Plot a bar chart of row counts conditioned on the categorical variable condvar, faceted on a second categorical variable, refinevar. Each faceted plot also shows a "shadow plot" of the totals conditioned on condvar alone.
condvar
refinevar
ShadowPlot(frm, condvar, refinevar, title, ..., ncol = 1)
data frame to get values from.
name of the primary conditioning variable (a categorical variable, controls x-axis).
name of the second or refining conditioning variable (also a categorical variable, controls faceting).
title to place on plot.
no unnamed argument, added to force named binding of later arguments.
numeric: number of columns in facet_wrap.
a ggplot2 bar chart counting examples grouped by condvar, faceted by refinevar.
This plot enables comparisons of subpopulation totals across both condvar and refinevar simultaneously.
By default, the facet plots are arranged in a single column. This can be changed with the optional ncol argument.
ncol
Please see here for some interesting discussion https://drsimonj.svbtle.com/plotting-background-data-for-groups-with-ggplot2.
# NOT RUN { ShadowPlot(mtcars, "carb", "cyl", title = "Number of example cars by carb and cyl counts") # }
Run the code above in your browser using DataLab