tests/testthat/test-is_full_column_rank.R

test_that(
  "check true",
  {
    expect_equal(
      is_full_column_rank(diag(9)),
      TRUE)
  }
)

test_that(
  "check false",
  {
    expect_equal(
      is_full_column_rank(diag(rep(0, times=4))),
      FALSE)
  }
)

test_that(
  "check false",
  {
    expect_equal(
      is_full_column_rank(diag(c(rep(0, times=4), 5))),
      FALSE)
  }
)

t_mat <- cbind(rep(1, 4), 1:4)

test_that(
  "check false",
  {
    expect_equal(
      is_full_column_rank(t_mat),
      TRUE)
  }
)

Try the MRTSampleSizeBinary package in your browser

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

MRTSampleSizeBinary documentation built on May 1, 2022, 5:08 p.m.