inst/utests/derive_model_obj/runit_id_map.R

# construct data ---------------------------------------------------------------

# idx:    1    2    3    4    5    6    7    8    9   10   11   12   13
# -----------------------------------------------------------------------
id  <- c("a", "a", "a", "b", "b", "b", "c", "d", "d", "d", "d", "d", "e")

target <- c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 4L, 4L, 4L, 4L, 4L, 5L)


# begin testing ----------------------------------------------------------------

test_id_map <- function() {
    checkIdentical(1L, get_id_map(99))
    checkIdentical(target, get_id_map(id))
}
dpritchLibre/dspBayes documentation built on Aug. 3, 2020, 9:52 a.m.