tests/testthat/test_logAlpha.R

context("logAlpha")

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

    expect_error(logAlpha(1))
})

test_that("Output has the right format", {
    m <- example$m
    la <- logAlpha(m)

    expect_equal(nrow(la), nrow(m$data))
    expect_equal(ncol(la), ncol(m$mle$stepPar))
})

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.