Skip to content

Commit 2b2280c

Browse files
delint
1 parent 2ed76df commit 2b2280c

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

R/ggbarstats.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ ggbarstats <- function(
110110
subtitle <- .extract_expression(subtitle_df)
111111

112112
# Bayes Factor caption
113-
if (type != "bayes" && bf.message && !paired) {
113+
if (type != "bayes" && bf.message && isFALSE(paired)) {
114114
caption_df <- .eval_f(contingency_table, !!!.f.args, type = "bayes")
115115
caption <- .extract_expression(caption_df)
116116
}

R/ggpiestats-ggbarstats-helpers.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ onesample_data <- function(data, x, y, digits = 2L, ratio = NULL, ...) {
6060
.chisq_test_safe <- function(data, x_col, ratio) {
6161
tryCatch(
6262
suppressWarnings(contingency_table(data, .data[[x_col]], ratio = ratio)),
63-
error = \(e) tibble(
64-
statistic = NA_real_, p.value = NA_real_, df = NA_real_,
65-
method = "Chi-squared test for given probabilities"
66-
)
63+
error = \(e) {
64+
tibble(
65+
statistic = NA_real_, p.value = NA_real_, df = NA_real_,
66+
method = "Chi-squared test for given probabilities"
67+
)
68+
}
6769
)
6870
}
6971

R/ggpiestats.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ ggpiestats <- function(
142142
subtitle <- .extract_expression(subtitle_df)
143143

144144
# Bayes Factor caption
145-
if (type != "bayes" && bf.message && !paired) {
145+
if (type != "bayes" && bf.message && isFALSE(paired)) {
146146
caption_df <- .eval_f(contingency_table, !!!.f.args, type = "bayes")
147147
caption <- .extract_expression(caption_df)
148148
}

0 commit comments

Comments
 (0)