tests/testthat/test.matrix_ops.R

context("Matrix helpers")

test_that("Flatten-unflatten matrix is reversible", {
  cv <- cov(iris[, -5])
  flat <- flatten_matrix(cv)
  unflat <- lowerdiag2mat(flat)

  expect_equal(cv, unflat)
})
ashiklom/mvtraits documentation built on Sept. 4, 2019, 7:43 a.m.