tests/testthat/test-frequency.R

context("test-frequency.R")

test_that("test of frequency method", {
  expect_equal(flag_frequency(c("p","b","s","b","u","e","b")),"b")
  expect_equal(flag_frequency(c("p","u","c","d","u","b")),"u")
  expect_equal(flag_frequency(c("p","b","p","u","b")),c("b","p"))
  expect_equal(flag_frequency(c(NA,NA,NA)),NA)
})

Try the flagr package in your browser

Any scripts or data that you put into this service are public.

flagr documentation built on May 2, 2019, 5:57 a.m.