inst/tinytest/test_blocks.R

# block index
A <- matrix(c(
  1,1,0,
  0,1,0,
  0,0,1),byrow=TRUE,nrow=3)

expect_equal(block_index(A),list(c(1,2),3))

Try the lintools package in your browser

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

lintools documentation built on Jan. 17, 2023, 1:06 a.m.