tests/testthat/test_validations.R

library(ClusterJudge)

test_that('error when clusters is an unamed vector or entity attribute does not have 2 columns',{
  expect_error(clusterJudge(c(1,2),c(1,2)),'clusters must have as names the entity names of the reference entity.attribute')

  expect_error(clusterJudge(c('1'=1,'2'=2),c(1,2)),'entity attribute structure must have only 2 columns')

}
)

Try the ClusterJudge package in your browser

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

ClusterJudge documentation built on March 11, 2021, 2 a.m.