plots new accept pri, sec and ter arguments instead of x,y,z to avoid confusion. tests, tests, tests

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-15 12:04:32 +02:00
commit 652a8ca1b7
No known key found for this signature in database
28 changed files with 3275 additions and 179 deletions

View file

@ -6,10 +6,10 @@
#' @name data-plots
#'
#' @examples
#' mtcars |> plot_hbars(x = "carb", y = "cyl")
#' mtcars |> plot_hbars(x = "carb", y = NULL)
plot_hbars <- function(data, x, y, z = NULL) {
out <- vertical_stacked_bars(data = data, score = x, group = y, strata = z)
#' mtcars |> plot_hbars(pri = "carb", sec = "cyl")
#' mtcars |> plot_hbars(pri = "carb", sec = NULL)
plot_hbars <- function(data, pri, sec, ter = NULL) {
out <- vertical_stacked_bars(data = data, score = pri, group = sec, strata = ter)
out
}