tests/testthat/test-magrittr.r

library(magrittr)

context("backpipe with magrittr")

test_that("backpipe works with magrittr as intended", {
  
  expect_equal( mean %<% 1:3, 2 )
  expect_equal( mean %<% range( na.rm = TRUE ) %<% c(1:3, NA), 2 )
  
})

Try the backpipe package in your browser

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

backpipe documentation built on June 26, 2018, 5:01 p.m.