tests/testthat/test_convertMatrixType.R

context("convertMatrixType")

test_that("convertMatrixType", {
  a1 = matrix(1:4, 2L, 2L)
  a2 = matrix(as.character(1:4), 2L, 2L)
  expect_equal(convertMatrixType(a1, "character"), a2)
})

Try the BBmisc package in your browser

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

BBmisc documentation built on Sept. 29, 2022, 5:12 p.m.