plot_counts | R Documentation |
Add counts as labelled bar plot on top of light_effects plot.
plot_counts(
p,
x,
text_size = 3,
facet_scales = "free_x",
show_labels = TRUE,
big.mark = "'",
scientific = FALSE,
digits = 0,
...
)
p |
The result of |
x |
An object of class "light_effects". |
text_size |
Size of count labels. |
facet_scales |
Scales argument passed to |
show_labels |
Should count labels be added as text? |
big.mark |
Parameter passed to |
scientific |
Parameter passed to |
digits |
Used to round the labels. Default is 0. |
... |
Further arguments passed to |
Experimental. Uses package ggpubr to rearrange the figure.
Thus, the resulting plot cannot be easily modified.
Furthermore, adding counts only works if the legend in plot.light_effects()
is not placed on the left or right side of the plot.
It has to be placed inside or at the bottom.
An object of class "ggplot".
plot.light_effects()
fit <- lm(Sepal.Length ~ ., data = iris)
fl <- flashlight(model = fit, label = "iris", data = iris, y = "Sepal.Length")
x <- light_effects(fl, v = "Species")
plot_counts(plot(x), x, width = 0.3, alpha = 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.