View source: R/mosaic_analysis.R
| plot.mosaic_analysis | R Documentation |
Re-renders the flat mosaic from the stored contingency table and residuals,
so styling can be changed without re-running the test. Any flat-mosaic
styling argument (tile_label, pct_base, col_label_side,
legend_size, ...) may be overridden via ....
## S3 method for class 'mosaic_analysis'
plot(x, ...)
x |
A |
... |
Styling overrides forwarded to the flat renderer. |
The ggplot object, invisibly (drawn as a side effect).
df <- data.frame(
a = sample(c("X", "Y", "Z"), 200, replace = TRUE),
b = sample(c("P", "Q"), 200, replace = TRUE)
)
res <- mosaic_analysis(df, "a", "b", min_count = 5)
plot(res, tile_label = "percent", legend_position = "bottom")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.