context("subset_gmat")
test_that("min.nfeats", {
zeallot::`%<-%`(c(g, npp), subset_gmat(object=M, Gmat=G[1:3,], min.nfeats=3))
expect_equal(as.numeric(g), rep(1, 3))
expect_equal(npp, c(pwy1=3))
zeallot::`%<-%`(c(g, npp), subset_gmat(object=M, Gmat=G[1:3,], min.nfeats=0))
expect_equal(as.numeric(g), c(1,1,1,0,1,1))
expect_equal(npp, c(pwy1=3, pwy2=2))
expect_error(subset_gmat(object=M, Gmat=G[1:3,], min.nfeats=4))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.