Description Usage Arguments Examples
Add a boxplot figure to the chart.
1 |
g |
An object of class |
... |
Options to pass to the figure, including |
sync |
Whether to sync the axis data (align) with that
used in other figures, set to |
data |
A dataset ( |
inherit_asp |
Whether to inherit the aspects paseed to
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # wide to long
# tidyr::pivot_longer(iris, -Species)
df <- reshape(
iris,
varying = names(iris)[1:4],
direction = "long",
v.names = "value",
idvar = "Species",
new.row.names = 1:600,
timevar = "var",
times = names(iris)[1:4]
)
g2(df, asp(var, value, color = Species)) %>%
fig_boxplot(adjust("dodge"))
g2(iris, asp(y = Sepal.Length, color = Species)) %>%
fig_boxplot(adjust("dodge"))
g2(iris, asp(x = Species, y = Sepal.Length, color = Species)) %>%
fig_boxplot(adjust("dodge"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.