library (surveyreader)
library(testthat)
context("Wrapper for Eurobarometer four-level agreement questions.")
test_that("correct conversion takes place", {
expect_equal(rescale_agreement_4 (c("Totally agree", "Tend to agree",
"Tend to disagree", "Totally disagree", "Missing"),
na_labels = "Missing"),
c(2,1,-1,-2,NA)
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.