8
8
# ' `"pp"` for probability-probability (P-P) plots, or
9
9
# ' `"density"` for density overlay plots.
10
10
# ' @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.
12
12
# ' @param alpha Numeric value specifying alpha level of the confidence bands.
13
13
# ' @param colors Character vector of length two, indicating the colors (in
14
14
# ' hex-format) for points and line.
@@ -48,7 +48,7 @@ plot.see_check_normality <- function(x,
48
48
size_axis_title = base_size ,
49
49
base_size = 10 ,
50
50
alpha = 0.2 ,
51
- dot_alpha = 0.8 ,
51
+ alpha_dot = 0.8 ,
52
52
colors = c(" #3aaf85" , " #1b6ca8" ),
53
53
detrend = TRUE ,
54
54
method = " ell" ,
@@ -96,7 +96,7 @@ plot.see_check_normality <- function(x,
96
96
linewidth = linewidth ,
97
97
size_point = size_point ,
98
98
alpha = alpha ,
99
- dot_alpha = dot_alpha ,
99
+ alpha_dot = alpha_dot ,
100
100
colors = colors ,
101
101
detrend = detrend ,
102
102
base_size = base_size ,
@@ -120,7 +120,7 @@ plot.see_check_normality <- function(x,
120
120
base_size = base_size ,
121
121
alpha_level = alpha ,
122
122
detrend = detrend ,
123
- dot_alpha_level = dot_alpha ,
123
+ alpha_dot = alpha_dot ,
124
124
model_info = model_info ,
125
125
method = method ,
126
126
model_class = class(model )[1 ]
@@ -160,7 +160,7 @@ plot.see_check_normality <- function(x,
160
160
size_title = size_title ,
161
161
alpha_level = alpha ,
162
162
detrend = detrend ,
163
- dot_alpha_level = dot_alpha ,
163
+ alpha_dot = alpha_dot ,
164
164
method = method
165
165
)
166
166
}
@@ -222,7 +222,7 @@ plot.see_check_normality <- function(x,
222
222
theme_style = theme_lucid ,
223
223
base_size = 10 ,
224
224
colors = unname(social_colors(c(" green" , " blue" , " red" ))),
225
- dot_alpha_level = 0.8 ,
225
+ alpha_dot = 0.8 ,
226
226
show_dots = TRUE ,
227
227
model_info = NULL ,
228
228
model_class = NULL ) {
@@ -259,7 +259,7 @@ plot.see_check_normality <- function(x,
259
259
stroke = 0 ,
260
260
size = size_point ,
261
261
colour = colors [2 ],
262
- alpha = dot_alpha_level ,
262
+ alpha = alpha_dot ,
263
263
detrend = detrend
264
264
),
265
265
qqplotr :: stat_qq_line(
@@ -358,7 +358,7 @@ plot.see_check_normality <- function(x,
358
358
theme_style = theme_lucid ,
359
359
base_size = 10 ,
360
360
colors = unname(social_colors(c(" green" , " blue" , " red" ))),
361
- dot_alpha_level = 0.8 ) {
361
+ alpha_dot = 0.8 ) {
362
362
if (requireNamespace(" qqplotr" , quietly = TRUE )) {
363
363
p_plot <- ggplot2 :: ggplot(x , ggplot2 :: aes(sample = .data $ res )) +
364
364
qqplotr :: stat_pp_band(alpha = alpha_level , detrend = detrend , bandType = method ) +
@@ -371,7 +371,7 @@ plot.see_check_normality <- function(x,
371
371
shape = 16 , stroke = 0 ,
372
372
size = size_point ,
373
373
colour = colors [2 ],
374
- alpha = dot_alpha_level ,
374
+ alpha = alpha_dot ,
375
375
detrend = detrend
376
376
)
377
377
} else if (requireNamespace(" MASS" , quietly = TRUE )) {
@@ -391,7 +391,7 @@ plot.see_check_normality <- function(x,
391
391
mapping = if (detrend ) ggplot2 :: aes(y = .data $ y - .data $ probs ),
392
392
colour = colors [2 ],
393
393
size = size_point ,
394
- alpha = dot_alpha_level
394
+ alpha = alpha_dot
395
395
)
396
396
} else {
397
397
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,
430
430
theme_style = theme_lucid ,
431
431
base_size = 10 ,
432
432
colors = unname(social_colors(c(" green" , " blue" , " red" ))),
433
- dot_alpha_level = 0.8 ,
433
+ alpha_dot = 0.8 ,
434
434
show_dots = TRUE ) {
435
435
lapply(names(x ), function (i ) {
436
436
dat <- x [[i ]]
@@ -452,7 +452,7 @@ plot.see_check_normality <- function(x,
452
452
ggplot2 :: aes(ymin = .data $ conf.low , ymax = .data $ conf.high ),
453
453
width = 0 ,
454
454
colour = colors [2 ],
455
- alpha = dot_alpha_level
455
+ alpha = alpha_dot
456
456
) +
457
457
theme_style(
458
458
base_size = base_size ,
@@ -467,7 +467,7 @@ plot.see_check_normality <- function(x,
467
467
geom_point2(
468
468
colour = colors [2 ],
469
469
size = size_point ,
470
- alpha = dot_alpha_level
470
+ alpha = alpha_dot
471
471
)
472
472
}
473
473
0 commit comments