tests/testthat/test-fseq.r

context("functional sequences")


test_that("fseq functions work", {
  a <- . %>% cos %>% sin %>% tan
  
  b <- function(x) tan(sin(cos(x)))

  expect_that(a(1:10), is_identical_to(b(1:10)))
})

Try the magrittr package in your browser

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

magrittr documentation built on March 30, 2022, 9:07 a.m.