pareto_chart.data.frame | R Documentation |
Create a Pareto chart for a data frame.
## S3 method for class 'data.frame'
pareto_chart(obj, labels, values, ...)
obj |
a data frame |
labels |
the column with the labels of the data frame |
values |
the column with the values of the data frame |
... |
further parameters (currently unused) |
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.
library(tibble)
set.seed(1)
tibble(
val=rnorm(10, sd=5),
cat=LETTERS[1:length(val)]
) %>%
pareto_chart(labels=cat, values=val)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.