From c7f11bec74a6e914e3cfb1b54c0da8bbdc21e4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Bojanowski?= Date: Thu, 20 Jun 2024 15:50:35 +0200 Subject: [PATCH] Simplify --- tests/testthat/test-degreedist.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-degreedist.R b/tests/testthat/test-degreedist.R index faf91a1..02ab5b2 100644 --- a/tests/testthat/test-degreedist.R +++ b/tests/testthat/test-degreedist.R @@ -114,15 +114,15 @@ for(i in seq(1, nrow(arg_df))) { fmh.ego, prob = prob, brgmod = brgmod, - by = by[[1]], + by = by, plot = FALSE ) ) # Conditional probs sum to number of cat. of `by` - if(prob && !is.null(by[[1]])) + if(prob && !is.null(by)) expect_equal(sum(res), length(unique(fmh.ego$ego[[by]]))) # Unconditional probs sum to 1 - if(prob && is.null(by[[1]])) expect_equal(sum(res), 1) + if(prob && is.null(by)) expect_equal(sum(res), 1) # Counts sum to # of egos if(!prob) expect_equal(sum(res), nrow(fmh.ego$ego)) }