tests/testthat/test_normalizeScore.R

library(otsad)
context("Normalize Score using Max and Min normalization")

test_that("NormalizeScore gives the correct result", {

  expect_equal(NormalizeScore(9, 2, 1), 800)
  expect_equal(NormalizeScore(9, 1, 0), 900)
  expect_equal(NormalizeScore(9, 0, 0), 9)

})

Try the otsad package in your browser

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

otsad documentation built on Sept. 6, 2019, 5:02 p.m.