paretochart: Paretochart

View source: R/paretochart.R

paretochartR Documentation

Paretochart

Description

Creates a pareto chart from a categorical variable

Usage

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

# 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 May 29, 2024, 5:05 a.m.