tests/testthat/test_MicrobiomeExperiment-subset-methods.R

context("MicrobiomeExperiment subset methods")

test_that("[ subsetting works", {
    ## TODO: add toy example for testing here
    counts <- matrix(rbinom(20, 5, .5), ncol = 4)
    rowData <- DataFrame()
    me <- MicrobiomeExperiment(SimpleList(counts = counts), rowData = rowData)

    expect_identical(me[], me)
    expect_identical(me[,], me)
    expect_identical(me[TRUE, ], me)
    expect_identical(me[, TRUE], me)
    expect_identical(me[TRUE, TRUE], me)
})
HCBravoLab/MicrobiomeExperiment documentation built on May 17, 2019, 8:47 p.m.