tests/testthat/test_setRowColNames.R

context("setRowColNames")

test_that("setRowColNames", {
  x = y = matrix(1:4, 2, 2)
  rownames(y) = c("a", "b")
  expect_equal(setRowNames(x, c("a", "b")), y)    
  colnames(y) = c("c", "d")
  expect_equal(setColNames(setRowNames(x, c("a", "b")), c("c", "d")), y)    
})

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.