library(gglite)
Faceting splits data into multiple panels. gglite supports rectangular and circular faceting.
g2(iris, Sepal.Length ~ Sepal.Width) |>
facet_rect(~ Species)
g2(iris, Sepal.Length ~ Sepal.Width) |>
facet_rect(y = ~ Species)
df = data.frame(
x = rnorm(200), y = rnorm(200),
a = sample(c('A', 'B'), 200, replace = TRUE),
b = sample(c('X', 'Y'), 200, replace = TRUE)
)
g2(df, y ~ x) |>
facet_rect(b ~ a)
g2(iris, Sepal.Length ~ Sepal.Width, color = ~ Species) |>
facet_rect(~ Species)
g2(iris, Sepal.Length ~ Sepal.Width) |>
facet_circle(position = ~ Species)