I have got three variables; employee, PM and site in my table sitereview. Imported data to R.
sitereview<-read.csv(file.choose(),header=TRUE)
Classified data into 6 equal intervals using equal.count
function from library(lattice)
.
equcount<-equal.count(sitereview$PM,6,0.05)
Plotted this to get the following table.
plot(equcount)
Distribution of PM based on intervals
However, i want these bars to be stacked based on site wise. SOmething like the following pic. Anyway to include attribute variable (site) into these bars.