library (surveyreader)
library(testthat)
context("Wrapper for direction of country/EU question.")
test_that("correct conversion takes place", {
expect_equal(rescale_political_interest (
column = c("Moderately interested in politics",
"Strongly interested in politics"),
from = c("Not at all interested in politics",
"Slightly interested in politics",
"Moderately interested in politics",
"Strongly interested in politics"),
to = c(0,0,0,1)),
factor( c(0,1), levels = c(0,1))
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.