tests/testthat/test_dimRedMethod-class.R

test_that("pars matching", {
    for (m in dimRedMethodList()) {
        mo <- getMethodObject(m)
        expect(
            all.equal(
                mo@stdpars,
                matchPars(mo, list())
            ),
            paste("par matching for", m, "failed")
        )
    }

    expect_warning(
      embed(iris[1:4], "PCA", asdf = 1234),
      "Parameter matching: asdf is not a standard parameter, ignoring."
    )
})

Try the dimRed package in your browser

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

dimRed documentation built on June 8, 2025, 10:52 a.m.