tests/testthat/test_method_det.R

context("method det")

test_that("polyMatrix", {
  init_data()

  expect_equal(det(pm_first), p(2, -19, 3, -12, 50, 18))
  expect_equal(det(pm_second), p(0))
})

test_that("minor", {
  init_data()

  expect_equal(minor(pm_first, 1, 2), p(0, 3, 1))
  expect_equal(minor(pm_first, 1, 1), p(2))
})

Try the polyMatrix package in your browser

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

polyMatrix documentation built on July 18, 2021, 5:06 p.m.