tests/testthat/test-modHistory.R

library(exprso)
data(iris)
e <- exprso(iris[1:100,1:4], iris[1:100,5])

A <- fsPCA(e)
B <- fsRDA(e)
C <- fsBalance(e)

test_that("modHistory reconstructs reduced dimensions", {

  expect_equal(
    A@exprs,
    modHistory(e, A)@exprs
  )

  expect_equal(
    B@exprs,
    modHistory(e, B)@exprs
  )

  expect_equal(
    C@exprs,
    modHistory(e, C)@exprs
  )
})

Try the exprso package in your browser

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

exprso documentation built on May 1, 2019, 7:11 p.m.