Nothing
test_that("i_valid_scale: correct return values", {
testData <- data.frame(
validScale = i_labelled(1:3, scale = c("nominal")),
invalidScale = i_labelled(1:3),
missingScale = i_labelled(1:3)
)
attr(testData$invalidScale, "scale") <- "invalid"
retList <- list(validScale = TRUE, invalidScale = FALSE, missingScale = FALSE)
expect_true(i_valid_scale(testData$validScale))
expect_false(i_valid_scale(testData$invalidScale))
expect_false(i_valid_scale(testData$missingScale))
expect_equal(i_valid_scale(testData), retList)
})
test_that("i_scale: remove scale by providing NULL value", {
x <- i_labelled(iris$Species, scale = "nominal")
x <- i_scale(x = x, scale = NULL)
expect_null(attr(x, "scale", exact = TRUE))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.