Skip to content

Commit

Permalink
Removed lints in test for #28
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Mar 1, 2024
1 parent 05d3bd7 commit 0c77491
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/testthat/test-reg.R
Original file line number Diff line number Diff line change
@@ -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))) {
Expand All @@ -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)
}
})

0 comments on commit 0c77491

Please sign in to comment.