tests/testthat/test_Mode.R

context("Mode")
library(testthat)
library(hmi)

#test_check("hmi")

test_that("Mode returns the actual mode", {
  expect_equal(Mode(c(1, 2, 2, 3)), 2)
})

Try the hmi package in your browser

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

hmi documentation built on Oct. 23, 2020, 7:31 p.m.