https://github.com/ctlab/phantasus
Raw File
Tip revision: 463a753148a0bf9e992b604f3fff056212f9536c authored by Alexey Sergushichev on 22 July 2018, 11:29:49 UTC
Timelimit for JS
Tip revision: 463a753
testutilfunctions.R
context("Util functions")

test_that("prepareData replaces all NAs and filters fully NA rows", {
  data <- prepareData(read.gct(system.file("testdata/centers.gct", package="phantasus")))
  expect_equal(nrow(data), 5)
})

test_that("data preparation successfully eliminates na-rows when at first rows are specified", {
  load(system.file("testdata/aa.rda", package="phantasus"))
  data <- prepareData(aa, rows = unlist(jsonlite::read_json(system.file("testdata/rows", package="phantasus"))))
  expect_equal(nrow(data), 10)
})
back to top