tests/testthat/test-remove_units.R

context("test-remove_units")

test_that("remove_units works", {
  ef_cetesb(p = "CO_0km", c("PC_G"))[1]
  expect_equal(remove_units(ef_cetesb(p = "CO_0km", c("PC_G"))[1]),
               0.1612112)
})

test_that("remove_units works", {
  df <- ef_cetesb(p = "CO_0km", c("PC_G", "PC_FG"))[1, ]
  row.names(df) <- NULL
  expect_equal(as.data.frame(remove_units(df)),
               data.frame(PC_G = 0.1612112, PC_FG = 0.2580112))
})

test_that("remove_units works", {
  df <- ef_cetesb(p = "CO_0km", c("PC_G", "PC_FG"))[1, ]
  row.names(df) <- NULL
  expect_equal(remove_units(as.matrix(df)),
               data.frame(PC_G = 0.1612112,
                          PC_FG = 0.2580112))
})

Try the vein package in your browser

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

vein documentation built on May 29, 2024, 7:20 a.m.