tests/testthat/test-freq-basic.R

# core formats ------------------------------------------------------------

test_that("basic freq of vector", {
  expect_snapshot(freq(iris$Species, plot = F, markdown=F))
})

test_that("basic freq of tidy vector", {
  expect_snapshot(freq(iris, Species, plot = F, markdown=F))
})

test_that("basic freq of indexing", {
  expect_snapshot(freq(iris[["Species"]], plot = F, markdown=F))
})

## Other things to test
# na.rm = T
# sorting
# plotting results
# as part of dplyr chain
# as part of base chain
MartinLBarron/freqR documentation built on Aug. 28, 2023, 12:05 p.m.