tests/testthat/test_stateProbs.R

context("stateProbs")

test_that("Exceptions are thrown",{
    m <- example$m
    expect_error(stateProbs(m), NA)
})

test_that("State probabilities sum to one",{
    m <- example$m
    sP <- stateProbs(m)
    expect_equal(rowSums(sP), rep(1 , nrow(m$data)))
})
TheoMichelot/moveHMM documentation built on March 18, 2024, 2:38 a.m.