#5, First Floor, 4th Street , Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to plot Pareto Chart in R?
Description

How to plot a Pareto Chart using R programming.

Process

Pareto Chart:

   A Pareto chart is a barplot where the categories are ordered in non increasing order

   A line is also added to show the cumulative sum(cumulative sum is similar to Fibonacci series)

R Package : qcc

R Function :chart()

Sapmle Code

#Pareto Chart

#Vector Input
x<-c(34,56,23,87,45,87,64,78,566,566)

#Sorting the vector in desending order
input<-sort(x,decreasing = TRUE)
print(input)

#Installing Package needed for pareto chart
#install.packages(“qcc”)
library(“qcc”)

#Pareto Chart
names(input)<-c(“x1″,”x2″,”x3″,”x4″,”x5″,”x6″,”x7″,”x8″,”x9″,”x10″)
pareto.chart(input,main=”ParetoChart”,col=rainbow(length(input)))

Screenshots