tests/testthat/test-default_penalty.R

library(rcbsubset)
context('Ensuring default penalties behave properly')



set.seed(2018 - 5 - 16)

dist.mat <- matrix(100*(runif(10*30)),nrow = 10)

#if (requireNamespace("optmatch", quietly = TRUE)){
test_that('Default penalties do not exclude more than absolutely necessary', {
	match.out <- rcbsubset(dist.mat, exclude.penalty = NULL) 	
	expect_equal(nrow(match.out$matches), nrow(dist.mat))
})
#}

Try the rcbsubset package in your browser

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

rcbsubset documentation built on March 26, 2022, 1:08 a.m.