tests/testthat/test-comparison_subset.R

test_that("comparison/equality subsetting ops are working", {
  expect_equal(1:3 %[==% 2, 2)
  expect_equal(1:3 %[!=% 2, c(1,3))
  expect_equal(1:3 %[<=% 2, c(1,2))
  expect_equal(1:3 %[>=% 2, c(2,3))
  expect_equal(1:3 %[<% 2, 1)
  expect_equal(1:3 %[>% 2, 3)
})

Try the inops package in your browser

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

inops documentation built on Nov. 19, 2019, 5:08 p.m.