Nothing
library(dplyr)
library(freqtables)
data(mtcars)
testthat::context("test-freq_test.R")
# =============================================================================
# Get sample size for cars with 4 cylinders
# =============================================================================
testthat::test_that("Group n is returned as expected", {
n <- mtcars %>% get_group_n(cyl == 4)
testthat::expect_match(n, "N = 11")
})
# =============================================================================
# Clean up
# =============================================================================
rm(mtcars, df)
detach("package:dplyr", unload=TRUE)
detach("package:freqtables", unload=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.