tests/testthat/test_spam.R

test_that("create spam object S", {
  expect_true(spam::is.spam(chol_s2Dp(im.res = c(5, 5), 
                                      use.spam = TRUE, 
                                      rho = 0.5)$S))
})

test_that("create spam object Q", {
  expect_true(spam::is.spam(chol_s2Dp(im.res = c(5, 5), 
                                      use.spam = TRUE,
                                      matrix.type = "prec")$Q))
})

test_that("correct class for chol. factor", {
  expect_true(class(chol_s2Dp(im.res = c(5, 5), 
                              use.spam = TRUE, 
                              rho = 0.5)$R) == 'spam.chol.NgPeyton')
})

Try the sim2Dpredictr package in your browser

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

sim2Dpredictr documentation built on April 3, 2023, 5:06 p.m.