create_pareto: Create Pareto Chart

Description Usage Arguments Value Examples

View source: R/create_pareto.R

Description

create_pareto generates a Pareto chart using the group, frequency and cumulative frequency columns of a frequency distribution table.

Usage

1
2
create_pareto(df, title = "Pareto Chart", subtitle = "",
  caption = "", x_label = "Groups", y_label = "Frequency")

Arguments

df

Data frame containing a frequency distribution table.

title

Character string; title to be displayed on Pareto chart. Default is "Pareto Chart".

subtitle

Character string; subtitle to be displayed on chart. Default is "".

caption

Character string; caption to be displayed on the chart. Default is "".

x_label

Character string; x axis label to be displayed on the chart. Default is "Groups".

y_label

Character string; y axis label to be displayed on the chart. Default is "Frequency".

Value

A plot containing a Pareto chart. If an error or warning occurs, a message will be printed to the console and the function will return NULL.

Examples

1
2
3
source <- c(1, 1, 1, 1, 2, 2, 2, 3, 3, 4)
table <- create_table(source, dec_pos = 3)
plot <- create_pareto(table)

fdistr documentation built on Jan. 11, 2020, 9:13 a.m.