Skip to content

Instantly share code, notes, and snippets.

@rsalaza4
Last active May 25, 2020 14:12
Show Gist options
  • Save rsalaza4/a69615daba7c7c56290838b46cc121cc to your computer and use it in GitHub Desktop.
Save rsalaza4/a69615daba7c7c56290838b46cc121cc to your computer and use it in GitHub Desktop.
# Import the qcc package
library(qcc)
# Create a vector with the number of defects per defect type
defects <- c(27, 389, 65, 9, 15, 30, 12, 109, 45, 321)
# Create a vector with the names of the defects
names(defects) <- c("Defect 1", "Defect 2", "Defect 3", "Defect 4",
"Defect 5", "Defect 6", "Defect 7", "Defect 8",
"Defect 9", "Defect 10")
# Create the Pareto chart
pareto.chart(defects,
ylab = "Frequency",
ylab2 ="Cumulative Percentage",
main = "Pareto Chart",
cumperc = seq(0, 100, by = 20))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment