tests/testthat/test-print.R

# context("test-print")

set.seed(42)
csr_pattern <- spatstat.random::runifpoint(n = 100)

csr_envelope <- spatstat.explore::envelope(csr_pattern, fun = "pcf", nsim = 199,
                                        funargs = list(divisor = "d",
                                                       correction = "Ripley",
                                                       stoyan = 0.25),
                                        verbose = FALSE)

result_csr <- summarize_envelope(csr_envelope)

testthat::test_that("print.env_summarised works", {

  testthat::expect_output(print(result_csr))
  testthat::expect_output(print(result_csr, return_area = TRUE))
})

Try the onpoint package in your browser

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

onpoint documentation built on Sept. 17, 2024, 5:09 p.m.