From 73e3fa7c5d86c5a55401abfbf30aad48316fb2e9 Mon Sep 17 00:00:00 2001 From: gnoblet Date: Sun, 28 May 2023 15:40:48 +0200 Subject: [PATCH] Added arg to center title --- R/waffle.R | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/R/waffle.R b/R/waffle.R index 2a569cf..7df06d9 100644 --- a/R/waffle.R +++ b/R/waffle.R @@ -16,10 +16,6 @@ #' @return A waffle chart #' #' @export -#' -#' @example -#' df <- data.frame(category = c("Category 1", "Category 2", "Category 3"),proportion = c(15, 55, 30)) -#' waffle(df, category, proportion, x_title = "A caption", title = "A title", subtitle = "A subtitle") waffle <- function(df, x, y, @@ -36,7 +32,7 @@ waffle <- function(df, axis_y = FALSE, legend_position = "bottom", legend_direction = "horizontal", - hjust = 0.5)){ + title_hjust = 0.5)){ # A basic and not robust check # - add check between 0 and 1