From 0c77491e14906e4c8848b6ec3178ed39d2025ae5 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 1 Mar 2024 14:32:06 +0100 Subject: [PATCH] Removed lints in test for #28 --- tests/testthat/test-reg.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/testthat/test-reg.R b/tests/testthat/test-reg.R index 225a5e8..0d78536 100644 --- a/tests/testthat/test-reg.R +++ b/tests/testthat/test-reg.R @@ -1,7 +1,5 @@ # Original function ============================================================ reg_R <- function(r, Z) { - K <- ncol(Z) - N <- nrow(Z) beta01 <- matrix(0, 1, ncol(r)) theta01 <- matrix(0, ncol(Z), ncol(r)) for (e in seq_len(ncol(r))) { @@ -20,6 +18,6 @@ test_that("reg() produces the correct output", { for (rp in seq_len(reps)) { r <- matrix(rnorm(n_obs[rp] * n_vars[rp]), n_obs[rp], n_vars[rp]) z <- as.matrix(sample(0:1, n_obs[rp], replace = TRUE)) - expect_equal(reg(r, z), reg_R(r, z)) + expect_identical(reg(r, z), reg_R(r, z), tolerance = 1e-10) } })