ggHorizBar {bayesbio}R Documentation

Create a color-labeled horizontal bar plot in ggplot2.

Description

This function takes a data frame and creates a horizontal (by default) bar plot from it while ordering the values.

Usage

ggHorizBar(data_df, dataCol, namesCol, labelsCol, decreasing = TRUE)

Arguments

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.

Value

A ggplot2 object, which can be plotted via the plot() function or saved via the ggsave() function.


[Package bayesbio version 1.0.0 Index]