tests/testthat/test-rescale_difficulty.R

library (surveyreader)
library(testthat)
context("Wrapper for difficulty of paying bills Eurobarometer trend question.")

test_that("correct conversion takes place", {
  expect_equal(rescale_difficulty(column = c("Most of the time", "From time to time",
                                              "Almost never/never")),
    c(2,1,0)
  )
})
antaldaniel/surveyreader documentation built on May 16, 2019, 2:29 a.m.