tests/testthat/test_getPPI.R

test_that("`getPPI()` works", {
    x = matrix(1:10, ncol = 2)
    y = matrix(5:14, ncol = 2)

    expect_equal(ncol(getPPI(x, y, type = 'combine')), 4L)
    expect_equal(ncol(getPPI(x, y, type = 'tensorprod')), 4L)
    expect_equal(ncol(getPPI(x, y, type = 'entrywise')), 4L)
    expect_equal(ncol(getPPI(x, y, type = c('combine', 'tensorprod'))), 8L)
    expect_equal(ncol(getPPI(x, y, type = c('combine', 'entrywise'))), 8L)
    expect_equal(ncol(getPPI(x, y, type = c('entrywise', 'tensorprod'))), 8L)
    expect_equal(ncol(getPPI(x, y, type = c('combine', 'entrywise', 'tensorprod'))), 12L)
})
road2stat/Rcpi documentation built on April 30, 2024, 6:44 a.m.