tests/testthat/test-organize_panels.R

context("test-organize_panels")

test_that("consistencia constante", {
  lista_bases <- list(toybase_individual_2016_03, toybase_individual_2016_04)
  pool_trimestral <- suppressWarnings(organize_panels(
    bases = lista_bases,
    variables = c("P21", "ESTADO"),
    window = "trimestral"
  ))

  expect_equal(round(sum(pool_trimestral$consistencia) / nrow(pool_trimestral), 2), 0.97)
})

Try the eph package in your browser

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

eph documentation built on June 23, 2024, 5:06 p.m.