From 57403032554fe747d51ba2d1fcb8f27744cff410 Mon Sep 17 00:00:00 2001 From: "Mattan S. Ben-Shachar" Date: Sun, 8 Dec 2024 09:41:53 +0200 Subject: [PATCH] lintr [skip] --- R/interpret_rope.R | 3 ++- man/interpret_rope.Rd | 3 ++- tests/testthat/test-convert_between.R | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/R/interpret_rope.R b/R/interpret_rope.R index 2ae5c88f..21860dd8 100644 --- a/R/interpret_rope.R +++ b/R/interpret_rope.R @@ -3,7 +3,8 @@ #' Interpretation of #' #' @param rope Value or vector of percentages in ROPE. -#' @param ci The Credible Interval (CI) probability, corresponding to the proportion of HDI, that was used. Can be `1` in the case of "full ROPE". +#' @param ci The Credible Interval (CI) probability, corresponding to the +#' proportion of HDI, that was used. Can be `1` in the case of "full ROPE". #' @param rules A character string (see details) or a custom set of [rules()]. #' #' @section Rules: diff --git a/man/interpret_rope.Rd b/man/interpret_rope.Rd index 1301cdad..41eabf1a 100644 --- a/man/interpret_rope.Rd +++ b/man/interpret_rope.Rd @@ -11,7 +11,8 @@ interpret_rope(rope, rules = "default", ci = 0.9) \item{rules}{A character string (see details) or a custom set of \code{\link[=rules]{rules()}}.} -\item{ci}{The Credible Interval (CI) probability, corresponding to the proportion of HDI, that was used. Can be \code{1} in the case of "full ROPE".} +\item{ci}{The Credible Interval (CI) probability, corresponding to the +proportion of HDI, that was used. Can be \code{1} in the case of "full ROPE".} } \description{ Interpretation of diff --git a/tests/testthat/test-convert_between.R b/tests/testthat/test-convert_between.R index 0acdea3b..fdd2392b 100644 --- a/tests/testthat/test-convert_between.R +++ b/tests/testthat/test-convert_between.R @@ -13,11 +13,11 @@ test_that("exact OR to d", { expect_equal(cor(oddsratio_to_d(OR), d), 1, tolerance = 0.0001) expect_equal(oddsratio_to_d(1), 0, tolerance = 0.0001) - expect_equal(oddsratio_to_d(OR, p0), d) + expect_equal(oddsratio_to_d(OR, p0), d, tolerance = 0.0001) expect_equal(cor(oddsratio_to_r(OR), d_to_r(d)), 1, tolerance = 0.0002) expect_equal(oddsratio_to_r(1), 0, tolerance = 0.0001) - expect_equal(oddsratio_to_r(OR, p0), d_to_r(d)) + expect_equal(oddsratio_to_r(OR, p0), d_to_r(d), tolerance = 0.0001) # From Chen et al 2010