attach(EPIDURAL)
Teasy <- factor(Ease,levels=c("Easy","Difficult","Impossible"))
X <- table(Doctor, Teasy)
X
par(mfrow=c(2,2)) # Figure 2.12
barplot(X,
main="Barplot where Doctor is Stacked
within Levels of Palpitation")
barplot(t(X),
main="Barplot where Levels of Palpitation
is Stacked within Doctor")
barplot(X, beside=TRUE,
main="Barplot where Doctor is Grouped
within Levels of Palpitation")
barplot(t(X), beside=TRUE,
main="Barplot where Levels of Palpitation
is Grouped within Doctor")
par(mfrow=c(1,1))
detach(EPIDURAL)
Run the code above in your browser using DataLab