percentage_bar: Create a Percentage Bar Chart

View source: R/percentage_bar.R

percentage_barR Documentation

Create a Percentage Bar Chart

Description

This function creates a percentage bar chart using ggplot2, where the user can specify the percentage to be represented as a bar along with an optional label.

Usage

percentage_bar(perc, label)

Arguments

perc

The percentage value to be represented as a bar in the chart.

label

An optional label to be displayed along with the percentage bar.

Value

A ggplot2 bar chart representing the given percentage value.

Examples

# Create a percentage bar chart with 30% labeled as "Completed"
percentage_bar(30, "Completed")


jazznbass/wmisc documentation built on Oct. 29, 2024, 5:42 p.m.