From 0f2bd5be33ab54d36197f42626442c6dc20118df Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 30 Sep 2023 09:31:35 +0200 Subject: [PATCH] lintr --- R/p_direction.R | 4 ++-- R/p_map.R | 4 ++-- R/p_significance.R | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/R/p_direction.R b/R/p_direction.R index 42dd104ec..efd141f83 100644 --- a/R/p_direction.R +++ b/R/p_direction.R @@ -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 ) diff --git a/R/p_map.R b/R/p_map.R index 88259e279..963ea5938 100644 --- a/R/p_map.R +++ b/R/p_map.R @@ -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 ) diff --git a/R/p_significance.R b/R/p_significance.R index c33cd9cb1..c022ddf3e 100644 --- a/R/p_significance.R +++ b/R/p_significance.R @@ -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 ) @@ -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).")