View source: R/aest_parts_and_whole.R
aest_parts_and_whole | R Documentation |
From a dataframe containing two discrete and one numeric variable, plots bars for each combination of the discrete variables and a line for the aggregate for each value of x_var
aest_parts_and_whole( df, x_var, y_var, group_var, position = "dodge", legend_spot = "right", caption_size = 5, line_colour = "black", title = NULL, subtitle = NULL, caption = NULL )
df |
dataframe that contains (at a minimum) two discrete and one numeric variables. |
x_var |
a discrete variable to plot on the x-axis |
y_var |
a numeric variable to be plotted on y-axis |
group_var |
another discrete variable that the data is grouped by |
position |
Either "stack" or "dodge", Default: 'dodge' |
legend_spot |
where to put the legend, Default: 'right' |
caption_size |
font size for caption, Default=5 |
line_colour |
the colour of the line |
title |
A title, Default: NULL |
subtitle |
A subtitle, Default: NULL |
caption |
A caption, Default: NULL |
DETAILS
OUTPUT_DESCRIPTION
## Not run: if(interactive()){ #EXAMPLE1 } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.