tests/testthat/test-order.R

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(sweep(logXpr, 1, logHK), 2, logref)
normtoPool <- sweep(sweep(logXpr, 2, logref), 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 June 8, 2025, 11:58 a.m.