tests/testthat/testtabulate_ff.R

library(testthat)

context("tabulate")

test_that("tabulate.ff works",{
   x <- c(1,1,2,3,3)
   xf <- ff(x)
   
   expect_identical(tabulate(x), tabulate.ff(xf))
   
   expect_identical(tabulate(x,2), tabulate.ff(xf,2))
   
   #expect_identical(tabulate(x,2), tabulate.ff(xf,2, TRUE)[])
})

Try the ffbase package in your browser

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

ffbase documentation built on Feb. 27, 2021, 5:06 p.m.