Skip to content

Commit

Permalink
Merge pull request #955 from strengejacke/strengejacke/issue954
Browse files Browse the repository at this point in the history
Warning message: The `fun.y` argument of `stat_summary()` is deprecated as of ggplot2 3.3.0.
  • Loading branch information
strengejacke authored Nov 25, 2024
2 parents e1bccc1 + a345db9 commit d61e1ae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: sjPlot
Type: Package
Encoding: UTF-8
Title: Data Visualization for Statistics in Social Science
Version: 2.8.16.1
Version: 2.8.16.2
Authors@R: c(
person("Daniel", "Lüdecke", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-8895-3206")),
person("Alexander", "Bartel", role = "ctb", comment = c(ORCID = "0000-0002-1280-6138")),
Expand Down
2 changes: 1 addition & 1 deletion R/plot_frq.R
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ plot_frq_helper <- function(
# different fill colours, because violin boxplots have white background
fcsp <- ifelse(type == "boxplot", "white", "black")
baseplot <- baseplot +
stat_summary(fun.y = "mean", geom = "point", shape = 21,
stat_summary(fun = "mean", geom = "point", shape = 21,
size = inner.box.dotsize, fill = fcsp)
# no additional labels for the x- and y-axis, only diagram title
baseplot <- baseplot + yscale + scalex
Expand Down
12 changes: 5 additions & 7 deletions R/plot_grid.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,13 @@ plot_grid <- function(x, margin = c(1, 1, 1, 1), tags = NULL) {
tags_labels <- NULL

# Add tags
if (isTRUE(tags)) {
if (isTRUE(tags) || is.null(tags)) {
tags_labels = LETTERS
} else if (length(tags) < length(x)) {
insight::format_warning("Not enough tags labels in list. Using letters instead.")
tags_labels = LETTERS
} else{
if (length(tags) < length(x)) {
warning("Not enough tags labels in list. Using letters instead.")
tags_labels = LETTERS
} else{
tags_labels = tags
}
tags_labels = tags
}

if (!is.null(tags_labels)) {
Expand Down
2 changes: 1 addition & 1 deletion R/plot_grpfrq.R
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ plot_grpfrq <- function(var.cnt,
# different fill colours, because violin boxplots have white background
fcsp <- ifelse(type == "boxplot", "white", "black")
baseplot <- baseplot +
stat_summary(fun.y = "mean", geom = "point", shape = 21,
stat_summary(fun = "mean", geom = "point", shape = 21,
size = inner.box.dotsize, fill = fcsp)
} else {
if (type == "dot") {
Expand Down

0 comments on commit d61e1ae

Please sign in to comment.