tests/testthat/test-survey.R

example_survey <- survey( 
  object =data.frame ( 
    rowid = 1:6,
    observations = runif(6)), 
  id = 'example', 
  filename = "no_file"
)

test_that("correct casting", {
  expect_true(inherits(example_survey, "survey"))
  expect_true(is.survey(example_survey))
  expect_equal(attr(example_survey, "filename"), "no_file")
})

Try the retroharmonize package in your browser

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

retroharmonize documentation built on Nov. 3, 2021, 1:07 a.m.