tests/testthat/test_svd.R

test_that("can run a simple svd with 1 component", {
  mat1 <- matrix(rnorm(10*15), 10, 15)
  pres <- svd_wrapper(mat1, 1)
  
  expect_equal(ncomp(pres),1)
})

test_that("can run a simple svd with 1 rsvd", {
  mat1 <- matrix(rnorm(10*15), 10, 15)
  pres <- svd_wrapper(mat1, 1, method="rsvd")
  
  expect_equal(ncomp(pres),1)
})

Try the multivarious package in your browser

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

multivarious documentation built on June 24, 2024, 5:20 p.m.