tests/testthat/test_crosstable.R

context("Crosstable")

test_that("Binary case",{
  
  tar <- rep(0L:1, 5)
  feat <- rep(0L:1, 5)
  fast_crosstable(tar, length(tar), sum(tar),  feat)

  expect_equal(fast_crosstable(tar, length(tar), sum(tar),  feat), 
               c(5L, 0L, 0L, 5L))
})

Try the biogram package in your browser

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

biogram documentation built on March 31, 2020, 5:14 p.m.