tests/testthat/test_classWeights.R

context("Calculate class weights")

test_that("classWeights", {
    data(dunkley2006)
    w <- table(fData(dunkley2006)[, "markers"])
    w <- 1/w[names(w) != "unknown"]
    expect_identical(classWeights(dunkley2006, "markers"), w)

    data(tan2009r1)
    w <- table(fData(tan2009r1)[, "pd.markers"])
    w <- 1/w[names(w) != "unknown"]
    expect_identical(classWeights(tan2009r1, "pd.markers"), w)
})

Try the pRoloc package in your browser

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

pRoloc documentation built on Nov. 8, 2020, 6:26 p.m.