powered by
Create a Pareto chart for a data frame.
# S3 method for data.frame pareto_chart(obj, labels, values, ...)
a Pareto chart (GGPlot2 object) of the data frame
Invisibly returns a data frame with the absolute values of the data frame, their sign, and the cumulative value.
a data frame
the column with the labels of the data frame
the column with the values of the data frame
further parameters (currently unused)
library(tibble) set.seed(1) tibble( val=rnorm(10, sd=5), cat=LETTERS[1:length(val)] ) %>% pareto_chart(labels=cat, values=val)
Run the code above in your browser using DataLab