tests/testthat/test-optional.R

context("test-optional")

x <- matrix(c(1, NA_real_, 2, NA_real_, 4, 5), ncol = 2)

test_that("can roundtrip optional rarray and rtensors", {
  expect_equal(test_roundtrip_rarray_optional(x), x)
  expect_equal(test_roundtrip_rtensor_optional(x), x)
})

Try the xtensor package in your browser

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

xtensor documentation built on Feb. 16, 2023, 7:47 p.m.