Provides a mosaic plot to visualize the association between two categorical variables
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.
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.
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
Introduction to Regression and Modeling
1 2 3
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.