library (surveyreader)
library(testthat)
context("Wrapper for direction of country/EU question.")
test_that("correct conversion takes place", {
expect_equal(rescale_direction (
column = c("In the right direction",
"Things are going in the wrong direction",
"In the wrong direction",
"Thins are going in the right direction",
"Neither the one or the other (SPONTANEOUS)",
"Inap. (not 1 in eu28)", "DK")),
c( 1, -1, -1, 1, 0, NA, NA)
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.