tests/testthat/test-order.R

library(magrittr)
set.seed(1)
logXpr <- replicate(5, rnorm(6))
dim(logXpr)

logHK <- apply(logXpr[, 4:5], 1, mean)
logref <- apply(logXpr[5:6, ], 2, mean)

normtoHK <- sweep(logXpr, 1, logHK) %>% sweep(., 2, logref)
normtoPool <- sweep(logXpr, 2, logref) %>% sweep(., 1, logHK)

test_that("Same Order", {
  expect_equal(normtoHK, normtoPool)
})

Try the nanostringr package in your browser

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

nanostringr documentation built on Aug. 15, 2023, 5:08 p.m.