Provides a mosaic plot to visualize the association between two categorical variables
1 2 
formula 
A standard R formula written as y~x, where y is the name of the variable playing the role of y and x is the name of the variable playing the role of x. 
data 
An optional argument giving the name of the data frame that contains x and y. If not specified, the function will use existing definitions in the parent environment. 
color 

labelat 
a vector of factor levels of 
xlab 
Label of horizontal axis if you want something different that the name of the 
ylab 
Label of vertical axis if you want something different that the name of the 
magnification 
Magnification of the labels of the 
equal 
If 
inside 
If 
This function shows a mosaic plot to visualize the conditional distributions of y
for each level of x
, along with the marginal distribution of y
to the right of the plot. The widths of the segmented bar charts are proportional to the frequency of each level of x
. These plots are the same that appear using associate
.
Adam Petrie
Introduction to Regression and Modeling
1 2 3 4 5 6 7 8 9 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.