tests/testthat/test-issues.R

test_that("is.na() on <dist>[[1]] (#29)", {
  x <- c(dist_normal(0,1), NA)
  expect_equal(
    is.na(x),
    c(FALSE, TRUE)
  )

  expect_equal(
    is.na(x[[1]]),
    FALSE
  )

  expect_equal(
    is.na(x[[2]]),
    TRUE
  )
})

Try the distributional package in your browser

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

distributional documentation built on June 27, 2026, 5:06 p.m.