tests/testthat/test_mstandardize.r

context("mstandardize")
test_that("works on a randomly generated matrix",{
  
  j <- matrix(1:30, nrow=5)
  jstand <- apply(j,2,function(x){(x - mean(x)) / sd(x)})
  
  
  expect_equivalent(mstandardize(j), jstand)
  
  
  
})
merc534/STAT3701-HW3 documentation built on May 25, 2019, 10:30 p.m.