Skip to content

Commit 4c09de2

Browse files
rename parameters to alpha_* pattern
1 parent 21a9a9a commit 4c09de2

36 files changed

+151
-151
lines changed

R/plot.bayesfactor_parameters.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' The `plot()` method for the `bayestestR::bayesfactor_parameters()` function.
44
#'
55
#' @param size_point Numeric specifying size of point-geoms.
6-
#' @param rope_alpha Numeric specifying transparency level of ROPE ribbon.
6+
#' @param alpha_rope Numeric specifying transparency level of ROPE ribbon.
77
#' @param color_rope Character specifying color of ROPE ribbon.
88
#' @param show_intercept Logical, if `TRUE`, the intercept-parameter is included
99
#' in the plot. By default, it is hidden because in many cases the
@@ -20,7 +20,7 @@
2020
plot.see_bayesfactor_parameters <- function(x,
2121
size_point = 2,
2222
color_rope = "#0171D3",
23-
rope_alpha = 0.2,
23+
alpha_rope = 0.2,
2424
show_intercept = FALSE,
2525
...) {
2626
if ("log_BF" %in% names(x) && !"BF" %in% names(x)) {
@@ -81,7 +81,7 @@ plot.see_bayesfactor_parameters <- function(x,
8181
ymin = 0,
8282
ymax = Inf,
8383
fill = color_rope,
84-
alpha = rope_alpha
84+
alpha = alpha_rope
8585
)
8686
} else {
8787
p <- p +

R/plot.check_homogeneity.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ plot.see_check_homogeneity <- function(x, data = NULL, ...) {
140140
size_axis_title = 10,
141141
base_size = 10,
142142
colors = unname(social_colors(c("green", "blue", "red"))),
143-
dot_alpha_level = 0.8,
143+
alpha_dot = 0.8,
144144
show_dots = TRUE) {
145145
p <- ggplot2::ggplot(x, ggplot2::aes(x = .data$x, .data$y))
146146

@@ -149,7 +149,7 @@ plot.see_check_homogeneity <- function(x, data = NULL, ...) {
149149
geom_point2(
150150
colour = colors[2],
151151
size = size_point,
152-
alpha = dot_alpha_level
152+
alpha = alpha_dot
153153
)
154154
}
155155

R/plot.check_model.R

+11-11
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ plot.see_check_model <- function(x,
3838
size_axis_title <- attr(x, "axis_title_size")
3939
size_title <- attr(x, "title_size")
4040
alpha_level <- attr(x, "alpha")
41-
dot_alpha_level <- attr(x, "dot_alpha")
41+
alpha_dot <- attr(x, "alpha_dot")
4242
show_dots <- attr(x, "show_dots")
4343
detrend <- attr(x, "detrend")
4444
model_info <- attr(x, "model_info")
@@ -73,8 +73,8 @@ plot.see_check_model <- function(x,
7373
alpha_level <- 0.2
7474
}
7575

76-
if (is.null(dot_alpha_level)) {
77-
dot_alpha_level <- 0.8
76+
if (is.null(alpha_dot)) {
77+
alpha_dot <- 0.8
7878
}
7979

8080
if (is.null(base_size)) {
@@ -124,7 +124,7 @@ plot.see_check_model <- function(x,
124124
size_axis_title = size_axis_title,
125125
size_title = size_title,
126126
colors = colors,
127-
dot_alpha_level = dot_alpha_level,
127+
alpha_dot = alpha_dot,
128128
show_dots = show_dots
129129
)
130130
}
@@ -168,7 +168,7 @@ plot.see_check_model <- function(x,
168168
size_axis_title = size_axis_title,
169169
size_title = size_title,
170170
colors = colors,
171-
dot_alpha_level = dot_alpha_level,
171+
alpha_dot = alpha_dot,
172172
show_dots = show_dots
173173
)
174174
}
@@ -185,7 +185,7 @@ plot.see_check_model <- function(x,
185185
size_title = size_title,
186186
base_size = base_size,
187187
colors = colors,
188-
dot_alpha_level = dot_alpha_level,
188+
alpha_dot = alpha_dot,
189189
show_dots = show_dots
190190
)
191191
}
@@ -212,7 +212,7 @@ plot.see_check_model <- function(x,
212212
linewidth = linewidth,
213213
size_point = 0.9 * size_point,
214214
alpha = alpha_level,
215-
dot_alpha = dot_alpha_level,
215+
alpha_dot = alpha_dot,
216216
colors = colors,
217217
detrend = detrend,
218218
style = style,
@@ -232,7 +232,7 @@ plot.see_check_model <- function(x,
232232
theme_style = style,
233233
base_size = base_size,
234234
colors = colors,
235-
dot_alpha_level = dot_alpha_level,
235+
alpha_dot = alpha_dot,
236236
show_dots = TRUE, # qq-plots w/o dots makes no sense
237237
model_info = model_info,
238238
model_class = model_class
@@ -264,7 +264,7 @@ plot.see_check_model <- function(x,
264264
theme_style = style,
265265
base_size = base_size,
266266
colors = colors,
267-
dot_alpha_level = dot_alpha_level,
267+
alpha_dot = alpha_dot,
268268
show_dots = TRUE # qq-plots w/o dots makes no sense
269269
)
270270

@@ -292,7 +292,7 @@ plot.see_check_model <- function(x,
292292
theme_style = theme_lucid,
293293
base_size = 10,
294294
colors = unname(social_colors(c("green", "blue", "red"))),
295-
dot_alpha_level = 0.8,
295+
alpha_dot = 0.8,
296296
show_dots = TRUE) {
297297
p <- ggplot2::ggplot(x, ggplot2::aes(x = .data$x, y = .data$y))
298298

@@ -301,7 +301,7 @@ plot.see_check_model <- function(x,
301301
geom_point2(
302302
colour = colors[2],
303303
size = size_point,
304-
alpha = dot_alpha_level
304+
alpha = alpha_dot
305305
)
306306
}
307307

R/plot.check_normality.R

+13-13
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' `"pp"` for probability-probability (P-P) plots, or
99
#' `"density"` for density overlay plots.
1010
#' @param linewidth Numeric value specifying size of line geoms.
11-
#' @param dot_alpha Numeric value specifying alpha level of the point geoms.
11+
#' @param alpha_dot Numeric value specifying alpha level of the point geoms.
1212
#' @param alpha Numeric value specifying alpha level of the confidence bands.
1313
#' @param colors Character vector of length two, indicating the colors (in
1414
#' hex-format) for points and line.
@@ -48,7 +48,7 @@ plot.see_check_normality <- function(x,
4848
size_axis_title = base_size,
4949
base_size = 10,
5050
alpha = 0.2,
51-
dot_alpha = 0.8,
51+
alpha_dot = 0.8,
5252
colors = c("#3aaf85", "#1b6ca8"),
5353
detrend = TRUE,
5454
method = "ell",
@@ -96,7 +96,7 @@ plot.see_check_normality <- function(x,
9696
linewidth = linewidth,
9797
size_point = size_point,
9898
alpha = alpha,
99-
dot_alpha = dot_alpha,
99+
alpha_dot = alpha_dot,
100100
colors = colors,
101101
detrend = detrend,
102102
base_size = base_size,
@@ -120,7 +120,7 @@ plot.see_check_normality <- function(x,
120120
base_size = base_size,
121121
alpha_level = alpha,
122122
detrend = detrend,
123-
dot_alpha_level = dot_alpha,
123+
alpha_dot = alpha_dot,
124124
model_info = model_info,
125125
method = method,
126126
model_class = class(model)[1]
@@ -160,7 +160,7 @@ plot.see_check_normality <- function(x,
160160
size_title = size_title,
161161
alpha_level = alpha,
162162
detrend = detrend,
163-
dot_alpha_level = dot_alpha,
163+
alpha_dot = alpha_dot,
164164
method = method
165165
)
166166
}
@@ -222,7 +222,7 @@ plot.see_check_normality <- function(x,
222222
theme_style = theme_lucid,
223223
base_size = 10,
224224
colors = unname(social_colors(c("green", "blue", "red"))),
225-
dot_alpha_level = 0.8,
225+
alpha_dot = 0.8,
226226
show_dots = TRUE,
227227
model_info = NULL,
228228
model_class = NULL) {
@@ -259,7 +259,7 @@ plot.see_check_normality <- function(x,
259259
stroke = 0,
260260
size = size_point,
261261
colour = colors[2],
262-
alpha = dot_alpha_level,
262+
alpha = alpha_dot,
263263
detrend = detrend
264264
),
265265
qqplotr::stat_qq_line(
@@ -358,7 +358,7 @@ plot.see_check_normality <- function(x,
358358
theme_style = theme_lucid,
359359
base_size = 10,
360360
colors = unname(social_colors(c("green", "blue", "red"))),
361-
dot_alpha_level = 0.8) {
361+
alpha_dot = 0.8) {
362362
if (requireNamespace("qqplotr", quietly = TRUE)) {
363363
p_plot <- ggplot2::ggplot(x, ggplot2::aes(sample = .data$res)) +
364364
qqplotr::stat_pp_band(alpha = alpha_level, detrend = detrend, bandType = method) +
@@ -371,7 +371,7 @@ plot.see_check_normality <- function(x,
371371
shape = 16, stroke = 0,
372372
size = size_point,
373373
colour = colors[2],
374-
alpha = dot_alpha_level,
374+
alpha = alpha_dot,
375375
detrend = detrend
376376
)
377377
} else if (requireNamespace("MASS", quietly = TRUE)) {
@@ -391,7 +391,7 @@ plot.see_check_normality <- function(x,
391391
mapping = if (detrend) ggplot2::aes(y = .data$y - .data$probs),
392392
colour = colors[2],
393393
size = size_point,
394-
alpha = dot_alpha_level
394+
alpha = alpha_dot
395395
)
396396
} else {
397397
insight::format_error("Package 'qqplotr' OR 'MASS' required for P-P plots. Please install one of them.")
@@ -430,7 +430,7 @@ plot.see_check_normality <- function(x,
430430
theme_style = theme_lucid,
431431
base_size = 10,
432432
colors = unname(social_colors(c("green", "blue", "red"))),
433-
dot_alpha_level = 0.8,
433+
alpha_dot = 0.8,
434434
show_dots = TRUE) {
435435
lapply(names(x), function(i) {
436436
dat <- x[[i]]
@@ -452,7 +452,7 @@ plot.see_check_normality <- function(x,
452452
ggplot2::aes(ymin = .data$conf.low, ymax = .data$conf.high),
453453
width = 0,
454454
colour = colors[2],
455-
alpha = dot_alpha_level
455+
alpha = alpha_dot
456456
) +
457457
theme_style(
458458
base_size = base_size,
@@ -467,7 +467,7 @@ plot.see_check_normality <- function(x,
467467
geom_point2(
468468
colour = colors[2],
469469
size = size_point,
470-
alpha = dot_alpha_level
470+
alpha = alpha_dot
471471
)
472472
}
473473

R/plot.check_outliers.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ plot.see_check_outliers <- function(x,
3636
size_title = 12,
3737
size_axis_title = base_size,
3838
base_size = 10,
39-
dot_alpha = 0.8,
39+
alpha_dot = 0.8,
4040
colors = c("#3aaf85", "#1b6ca8", "#cd201f"),
4141
rescale_distance = TRUE,
4242
type = c("dots", "bars"),
@@ -55,7 +55,7 @@ plot.see_check_outliers <- function(x,
5555
size_axis_title = size_axis_title,
5656
size_title = size_title,
5757
base_size = base_size,
58-
dot_alpha_level = dot_alpha,
58+
alpha_dot = alpha_dot,
5959
colors = colors
6060
)
6161
} else if (length(outlier_methods) == 1) {

R/plot.check_outliers_new.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
theme_style = theme_lucid,
1212
base_size = 10,
1313
colors = unname(social_colors(c("green", "blue grey", "red"))),
14-
dot_alpha_level = 0.8,
14+
alpha_dot = 0.8,
1515
show_dots = TRUE) {
1616
linewidth <- linewidth %||% 0.7
1717
size_text <- size_text %||% 3
@@ -30,7 +30,7 @@
3030
p <- p + geom_point2(
3131
aes(colour = .data$Influential),
3232
na.rm = na.rm,
33-
alpha = dot_alpha_level,
33+
alpha = alpha_dot,
3434
size = size_point
3535
)
3636
}

0 commit comments

Comments
 (0)