Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 30, 2023
1 parent 55dfa5b commit 0f2bd5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions R/p_direction.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ p_direction.data.frame <- function(x, method = "direct", null = 0, ...) {
}

out <- data.frame(
"Parameter" = names(x),
"pd" = pd,
Parameter = names(x),
pd = pd,
row.names = NULL,
stringsAsFactors = FALSE
)
Expand Down
4 changes: 2 additions & 2 deletions R/p_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ p_map.data.frame <- function(x, null = 0, precision = 2^10, method = "kernel", .
}

out <- data.frame(
"Parameter" = names(x),
"p_MAP" = p_MAP,
Parameter = names(x),
p_MAP = p_MAP,
row.names = NULL,
stringsAsFactors = FALSE
)
Expand Down
10 changes: 5 additions & 5 deletions R/p_significance.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ p_significance.data.frame <- function(x, threshold = "default", ...) {
}

out <- data.frame(
"Parameter" = names(x),
"ps" = as.numeric(ps),
Parameter = names(x),
ps = as.numeric(ps),
row.names = NULL,
stringsAsFactors = FALSE
)
Expand Down Expand Up @@ -294,10 +294,10 @@ as.double.p_significance <- as.numeric.p_significance
}
# If default
if (all(threshold == "default")) {
if (!is.null(model)) {
threshold <- rope_range(model, verbose = verbose)[2]
} else {
if (is.null(model)) {
threshold <- 0.1
} else {
threshold <- rope_range(model, verbose = verbose)[2]
}
} else if (!all(is.numeric(threshold))) {
insight::format_error("`threshold` should be 'default' or a numeric value (e.g., 0.1).")
Expand Down

0 comments on commit 0f2bd5b

Please sign in to comment.