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)))
})

Try the moveHMM package in your browser

Any scripts or data that you put into this service are public.

moveHMM documentation built on May 31, 2023, 6:13 p.m.