# NOT RUN {
# print frequencies
crosstab(mtcars, cyl, gear)
# print cell percents
crosstab(cardata, vehicle_size, driven_wheels)
crosstab(cardata, vehicle_size, driven_wheels,
plot=TRUE)
crosstab(cardata, driven_wheels, vehicle_size,
type="colpercent", plot=TRUE, chisquare=TRUE)
# }
Run the code above in your browser using DataLab