xyplot(Ozone~Wind | Month,data=airquality,layout=c(5,1)) histogram(~Sepal.Length|Species,data=iris) bwplot(Sepal.Length~Species,data=iris) require(UsingR) #opens the functions and data of #the package UsingR attach(kid.weights) #allows to write height #instead of kid.weights$height... histogram(~weight|gender,data=kid.weights,layout=c(1,2)) histogram(~height|gender,data=kid.weights,layout=c(1,2)) mean(weight[gender=="M"]) mean(weight[gender=="F"]) mean(height[gender=="M"]) mean(height[gender=="F"]) H=read.csv(file="male_female_over_20_heights.csv") str(H) histogram(~H$height|H$gender,layout=c(1,2))