test_that("two_by_two works", {
expect_equal(
object =
two_by_two(
panel_data = nci_1,
evaluation_data = test_eval
),
expected =
tibble::tribble(
~`SARS-COV-2 ELISA (IgG)`, ~`IgG+`, ~`IgG-`, ~`Total`,
"IgG+", 27L, NA_integer_, 27L,
"IgG Borderline", 2L, NA_integer_, 2L,
"IgG-", 1L, 80L, 81L,
"Total", 30L, 80L, 110L
) %>%
dplyr::mutate(
`SARS-COV-2 ELISA (IgG)` =
forcats::as_factor(.data$`SARS-COV-2 ELISA (IgG)`)
),
ignore_attr = TRUE
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.