paretochart: Paretochart

Description Usage Arguments Value Examples

View source: R/paretochart.R

Description

Creates a pareto chart from a categorical variable

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
paretochart(
  x,
  title = "",
  subtitle = NULL,
  caption = NULL,
  ylab = NULL,
  xlab = NULL,
  x.angle = NULL,
  useNA = FALSE,
  print.data = FALSE
)

Arguments

x

Categorical variable to plot.

title

Chart title.

subtitle

Chart subtitle.

caption

Chart caption.

ylab

Y axis label.

xlab

X axis label.

x.angle

Number indicating the angle of x axis labels.

useNA

If TRUE, NA values will be included in the analysis.

print.data

If TRUE, prints data frame with results.

Value

An object of class ggplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Generate categorical vector
x <- rep(LETTERS[1:9], c(256, 128, 64, 32, 16, 8, 4, 2, 1))

# Make paretochart
paretochart(x)

# Save paretochart object to variable
p <- paretochart(x)

# Print data frame
p$data

qicharts2 documentation built on July 8, 2021, 5:08 p.m.