# context("Test outcome wrappers")
#
#
# ### Test wrap unique outcome
#
# test_that("Wrap unique outcome works as expected", {
# actual_res <- wrap_unique_outcome(2)
# expected_res <- tibble::tibble(
# .id = 1:2,
# outcome = rep(0, 2),
# outcome_type = rep(factor("outcome_1"), 2)
# )
# expect_equal(actual_res, expected_res)
# })
#
# ### Test wrap outcome
#
# test_that("Test that wrap outcome works as expected", {
# actual_res <- wrap_outcome(list(a = c(1), b = c(0)))
# expected_res <- tibble::tibble(outcome_type = as.factor(c("a","b")), .id = as.integer(c(1,1)), outcome = c(1,0))
# expect_equal(actual_res, expected_res)
# })
#
# test_that("test that wrap_outcome_names works as expected", {
# actual_res <- wrap_outcome_names(c("a","b"), data.frame(a = 1, b = 0))
# expected_res <- tibble::tibble(outcome_type = as.factor(c("a","b")), .id = as.integer(c(1,1)), outcome = c(1,0))
# expect_equal(actual_res, expected_res)
# })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.