ggHorizBar: Create a color-labeled horizontal bar plot in ggplot2.

Description Usage Arguments Value

View source: R/ggHorizBar.R

Description

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

Usage

1
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.


bayesbio documentation built on May 2, 2019, 3:43 a.m.