tests/testthat/test_clusterTopics.R

context("clusterTopics")

test_that("clusterTopics", {

load("data/test-k3i20b70s24601alpha0.33eta0.33.RData")

## cT <- clusterTopics(ldaresult=result, method = "average", width=30, height=15)
## cT2 <- clusterTopics(ldaresult=result, method = "single", width=30, height=15)
## save(cT,cT2,file="data/clusterTopics.RData")

load("data/clusterTopics.RData")

expect_equal(cT, clusterTopics(ldaresult=result, file=file.path(tempdir(),"abc.pdf"), method = "average", width=30, height=15))
expect_equal(cT2, clusterTopics(ldaresult=result, file=file.path(tempdir(),"abc.pdf"), method = "single", width=30, height=15))
})

Try the tosca package in your browser

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

tosca documentation built on Oct. 28, 2021, 5:07 p.m.