# Univarate Box And Whisker Plots

# load dataset
data(iris)
# Create separate boxplots for each attribute
par(mfrow=c(1,4))
for(i in 1:4) {
	boxplot(iris[,i], main=names(iris)[i])
}


# Create separate boxplots for each attribute
id_versicolor <- iris[,5]=="versicolor"
df <- iris[id_versicolor,1:4]
par(mfrow=c(1,4))
for(i in 1:4) {
  boxplot(df[,i], main=names(iris)[i])
}