data("TravelMode")
## overall proportions for chosen mode
with(TravelMode, prop.table(table(mode[choice == "yes"])))
## travel vs. waiting time for different travel modes
if(require("lattice")) {
xyplot(travel ~ wait | mode, data = TravelMode)
}
Run the code above in your browser using DataLab