Description Usage Arguments Value Examples
A convenient method to get bar plot from qualitative variable.
1 2 3 4 5 6 7 8 | getBarPlot(
data,
variable,
group = NULL,
legend.position = "right",
legend.width = 30,
na.rm = TRUE
)
|
data |
a data.frame, containing the qualitative variable to describe with barplot |
variable |
a character vector, containing the name of the variables to describe |
group |
a character vector of length one, containing the name of the group which need to be used to describe the qualitative variable. Depault to NULL |
legend.position |
a characher vector of length one, containing the legend position. Must be in 'right', 'left', 'top', 'bottom, 'none'. Default to 'right'. |
legend.width |
a numeric vector of length one, containing the legend width. Default to 50 |
na.rm |
a boolean vector of length one. If TRUE, missig value of variable will be remove. Default to TRUE |
a ggplot2 plot
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.