tests/testthat/testextract.R

library(testthat)

context("extract")

test_that("Extracting with logical vector works", {
  x <- 1:2
  y <- c(TRUE, FALSE)
  x_ff <- ff(x)
  y_ff <- ff(y)
  
  expect_equal(x[y], x_ff[y_ff][])
})

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.