tests/testthat/test-plotCorrelation.R

library(vegan)
data(varespec)
data(varechem)

test_that("plotCorrelation works with multiple methods result", {
  # Generate multiple methods result
  multi_result <- betaStability(
    comtable = varespec,
    envmeta = varechem,
    method = c("linearPred", "mlPred")
  )

  # Test that plotStability returns a ggplot object
  expect_s3_class(plotCorrelation(multi_result), "ggplot")
})

Try the betaStability package in your browser

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

betaStability documentation built on June 5, 2026, 5:08 p.m.