tests/testthat/test_applyCoeffs.R

## ------------------------------------------------------------------------- ##
## function 'applyCoeffs':
## ------------------------------------------------------------------------- ##
test_that(desc="testApplyCoeffs", code={
  x <- matrix(rnorm(10), nrow=2, ncol=5)
  eSet <- Biobase::ExpressionSet(assayData=x)

  normCoeffs <- rnorm(5)
  eSetNormed <- TPP:::applyCoeffs(eSet, normCoeffs)
  
  xNew <- unname(Biobase::exprs(eSetNormed))
  xRef <- rbind(x[1,] * normCoeffs, x[2,] * normCoeffs)
  
  expect_equal(xNew, xRef)
})

Try the TPP package in your browser

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

TPP documentation built on Nov. 8, 2020, 5:55 p.m.