Skip to content

Commit

Permalink
fix test for type daily
Browse files Browse the repository at this point in the history
  • Loading branch information
robitalec committed Apr 27, 2019
1 parent 26b95dd commit 7b649b0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/testthat/test-random.R
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,11 @@ test_that('n individuals consistent across years', {
datetime = 'datetime',
iterations = 20
)

uID <- randDaily[, .(nID = .N), by = .(randomID, yr, iteration)]
uJul <- randDaily[, .(nDay = uniqueN(jul)), by = .(randomID, yr, iteration)]

expect_equal(
uID[, sd(nID), by = .(randomID, yr)]$V1,
rep(0, randDaily[, uniqueN(randomID)])
uJul[, sd(nDay), by = .(randomID, yr)]$V1,
rep(0, nrow(randDaily[, .N, .(randomID, yr)]))
)

})

0 comments on commit 7b649b0

Please sign in to comment.