Skip to content

Commit

Permalink
Warning message: The fun.y argument of stat_summary() is deprecat…
Browse files Browse the repository at this point in the history
…ed as of ggplot2 3.3.0.

Fixes #954
  • Loading branch information
strengejacke committed Nov 25, 2024
1 parent 19d846b commit a345db9
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 = "d.luedecke@uke.de", 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 a345db9

Please sign in to comment.