Learn R Programming

nomiShape (version 1.0.1)

pareto: Pareto Plot for Nominal Variables

Description

Creates a Pareto chart for a nominal variable, displaying frequencies and cumulative percentages.

Usage

pareto(df, var, show_table = TRUE)

Value

A ggplot2 object representing the Pareto chart.

Arguments

df

A data.frame or tibble containing the variable.

var

Character. Name of the variable in df.

show_table

Logical; if TRUE, prints the frequency table. Default is FALSE.

Examples

Run this code
pareto(categories, "animal")

Run the code above in your browser using DataLab