Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jan 31, 2024
1 parent 9746fd1 commit 07c2a33
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion R/geom_from_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ geom_from_list <- function(x, ...) {
}

# Default for violin
if (x$geom == "violin") {
if (x$geom == "violin") { # nolint
stat <- "ydensity"
position <- "dodge"
} else if (x$geom == "boxplot") {
Expand Down
4 changes: 2 additions & 2 deletions R/plot.check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ plot.see_check_model <- function(x,
pw <- plots(p, n_columns = n_columns)
.safe_print_plots(pw, ...)
invisible(pw)
} else {
return(p)
}

p
}


Expand Down
2 changes: 1 addition & 1 deletion R/plot.check_normality.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ plot.see_check_normality <- function(x,
alpha_level = alpha
)
} else {
if (type == "qq") {
if (type == "qq") { # nolint
model_info <- attributes(x)$model_info
if (inherits(model, c("lme", "lmerMod", "merMod", "glmmTMB", "afex_aov", "BFBayesFactor"))) {
res_ <- suppressMessages(sort(stats::residuals(model), na.last = NA))
Expand Down
12 changes: 5 additions & 7 deletions R/plot.check_outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ plot.see_check_outliers <- function(x,
...) {
type <- match.arg(type)
influential_obs <- attributes(x)$influential_obs
methods <- attr(x, "methods", exact = TRUE)
outlier_methods <- attr(x, "methods", exact = TRUE)

if (type == "dots" && !is.null(influential_obs) && (is.null(methods) || length(methods) == 1)) {
if (type == "dots" && !is.null(influential_obs) && (is.null(outlier_methods) || length(outlier_methods) == 1)) {
.plot_diag_outliers_new(
influential_obs,
show_labels = show_labels,
Expand All @@ -52,12 +52,10 @@ plot.see_check_outliers <- function(x,
dot_alpha_level = dot_alpha,
colors = colors
)
} else if (length(outlier_methods) == 1) {
.plot_diag_outliers(x, show_labels = show_labels, size_text = size_text, rescale_distance = rescale_distance)
} else {
if (length(methods == 1)) {
.plot_diag_outliers(x, show_labels = show_labels, size_text = size_text, rescale_distance = rescale_distance)
} else {
.plot_outliers_multimethod(x, rescale_distance)
}
.plot_outliers_multimethod(x, rescale_distance)
}
}

Expand Down

0 comments on commit 07c2a33

Please sign in to comment.