knitr::opts_chunk$set(
  error = TRUE,
  collapse = TRUE,
  comment = "#>",
  out.width = "100%"
)
library(testthat)
library(matrixR)
context("Test IsInvertible.")
test_that("TRUE.", {
  expect_true(
    IsInvertible(diag(2))
  )
})
test_that("FALSE.", {
  expect_false(
    IsInvertible(matrix(1, nrow = 2, ncol = 2))
  )
  # to cover OTHERWISE
  expect_false(
    IsInvertible(matrix(1:10, ncol = 2))
  )
})


jeksterslab/matrixR documentation built on Feb. 22, 2021, 8:10 a.m.