Description Usage Arguments Value
This function takes a data frame and creates a horizontal (by default) bar plot from it while ordering the values.
1 | ggHorizBar(data_df, dataCol, namesCol, labelsCol, decreasing = TRUE)
|
data_df |
Data frame with columns to specify the data values, the row names, and the fill colors of each of the bars. |
dataCol |
The column name that specifies the values to be plotted. |
namesCol |
The column name that specifies the corresponding names for each of the bar plots to be plotted. |
labelsCol |
The column name that specifies the groups of the labels. |
decreasing |
Logical specifying whether the values in dataCol should be in decreasing order. |
A ggplot2 object, which can be plotted via the plot() function or saved via the ggsave() function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.