Learn R Programming

fdistr (version 0.1.0)

create_pareto: Create Pareto Chart

Description

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

Usage

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

Run this code
# NOT RUN {
source <- c(1, 1, 1, 1, 2, 2, 2, 3, 3, 4)
table <- create_table(source, dec_pos = 3)
plot <- create_pareto(table)

# }

Run the code above in your browser using DataLab