tests/testthat/test-utils.R

test_that("directionalise", {

  iData <- ASEM_iData[c("LPI", "Flights", "CO2")]
  coin <- build_example_coin(up_to = "new_coin", quietly = TRUE)

  iData_ <- directionalise(iData, coin)

  iData2 <- iData
  iData2$CO2 <- -iData2$CO2

  expect_equal(iData_, iData2)

})

Try the COINr package in your browser

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

COINr documentation built on Oct. 9, 2023, 5:07 p.m.