tests/testthat/test-01_project_to_one_mode.R

test_that("project_to_one_mode produces square Matrix", {
  my_matrix <- sparseMatrix(i = c(1, 1, 2, 3, 4, 4, 5, 6, 7, 7),
                            j = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), x = 1
  )
  mat <- project_to_one_mode(adj_mat = my_matrix, mode = "rows")
  expect_equal(dim(mat)[1], dim(mat)[2])
})

Try the birankr package in your browser

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

birankr documentation built on March 24, 2020, 1:08 a.m.