piechart | R Documentation |
Draw a pie chart.
piechart(
x,
labels = NULL,
col = heat.colors(5, 1),
border = FALSE,
main = NULL,
...
)
x |
R object (list) of class leem. Use |
labels |
One or more expressions or character strings giving names for the slices |
col |
Character vector. Default |
border |
Logical argument (default |
main |
Title name. |
... |
further arguments passed to or from other methods. |
library(leem)
# Example 1
school <- rep(c("high", "university", "basic"), 3:5)
x <- sample(school, 30, TRUE) |>
new_leem() |>
tabfreq(ordered = c("basic", "high", "university"))
# Example 2
x <- rbinom(36, 10, 0.6)
x <- new_leem(x, variable = "discrete")
x <- tabfreq(x)
piechart(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.