tests/testthat/test-util.R

context("util")

test_that("standardized and destandardized", {
  .data <- iris[, 1]
  res <- standardized(.data)
  orig <- destandardized(res,
                         mean(.data, na.rm = T),
                         sd(.data, na.rm = T))
  expect_true(identical(.data, orig))
})

Try the cbar package in your browser

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

cbar documentation built on Nov. 17, 2017, 7:43 a.m.