tests/testthat/test-filter.R

test_that("filtering data frame by column with regex", {
  x <- filter_rx(iris, Species, "^v")
  expect_true(all(grepl("^v", unique(x$Species))))
})

Try the k5 package in your browser

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

k5 documentation built on May 29, 2024, 7:48 a.m.