tests/testthat/test-pcn.R

test_that("pcn simulation and selection works", {
  set.seed(9)
  A <- matrix(rnorm(300), nrow = 20)
  pc.dat <- pcn_simulate(A, n.sim = 50)
  cl <- sample(1:4, 20, replace = TRUE)
  pc.select <- pcn_select(pc.dat, cl, "rep")
  expect_length(pc.select, 2)

  pc.select <- pcn_select(pc.dat, cl, "range")
  expect_length(pc.select, 3)
})

Try the diceR package in your browser

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

diceR documentation built on Sept. 29, 2023, 1:06 a.m.