powered by
Creates a Pareto chart for a nominal variable, displaying frequencies and cumulative percentages.
pareto(df, var, show_table = TRUE)
A ggplot2 object representing the Pareto chart.
ggplot2
A data.frame or tibble containing the variable.
Character. Name of the variable in df.
df
Logical; if TRUE, prints the frequency table. Default is FALSE.
pareto(categories, "animal")
Run the code above in your browser using DataLab