library (surveyreader)
library(testthat)
context("Wrapper for EU2020 goals trend question.")
test_that("correct conversion takes place", {
expect_equal(rescale_goal (c("Too ambitious", "Too modest",
"Inap", "About right")),
c(-1,1,NA,0)
)
expect_equal(
rescale_goal (
column = c("Too ambitious", "Too modest",
"Inap", "About right"),
return_class = "character",
underscore = FALSE),
c("too ambitious","too modest",NA,"about right")
)
})
na_labels = "default"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.