tests/testthat/test-ipeadata.R

test_that("ipeadata returns values", {
  
  skip_on_cran()
  skip_if_offline()
  
  x <- ipeadata(
    code = "PRECOS12_IPCA12",
    label = FALSE,
    quiet = TRUE
  )
  
  expect_s3_class(x, "data.frame")
  
  expect_true(all(
    c("code", "date", "value") %in% names(x)
  ))
  
})

Try the ipeadatar package in your browser

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

ipeadatar documentation built on May 28, 2026, 5:08 p.m.