tests/testthat/test_functions.R

library(testthat)
library(vrnmf)


test_that("vol_preprocess() functionality", {
	small_example <- sim_factors(5, 5, 5)
	vol <- vol_preprocess(t(small_example$X))
	expect_equal(length(vol), 8)
})


test_that("AnchorFree() functionality", {
	small_example <- sim_factors(5, 5, 5)
	vol <- vol_preprocess(t(small_example$X))
	vol.anchor <- AnchorFree(vol)
	expect_equal(length(vol.anchor), 6)
})

Try the vrnmf package in your browser

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

vrnmf documentation built on March 18, 2022, 6:11 p.m.