tests/testthat/test-cdb_mean_matF.R

test_that("cdb_mean_matF works correctly", {
  x <- cdb_mean_matF(Compadre)

  expect_type(x, "list")
  expect_true(inherits(x[[1]], "matrix"))
  expect_length(x, nrow(Compadre@data))
})

test_that("cdb_mean_matF warns and fails gracefully", {
  expect_error(cdb_mean_matF(Compadre@data))
})

Try the Rcompadre package in your browser

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

Rcompadre documentation built on Oct. 17, 2024, 1:07 a.m.