Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
References #82.
  • Loading branch information
mbojan committed Jun 20, 2024
1 parent 8b05ae9 commit 15687c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-degreedist.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 15687c1

Please sign in to comment.