tests/testthat/test-ps_ordinate.R

test_that("`ps_ordinate()` and `ps_rgb()` run without error on example data", {
      ps <- ps_add_dissim(ps_simulate())

      expect_no_error(ps_ordinate(ps, method = "cmds", k = 4))
      expect_no_error(ps_ordinate(ps, method = "nmds", k = 2))
      expect_no_error(ps_ordinate(ps, method = "pca"))

      expect_no_error(ps_rgb(ps, method = "pca"))
      expect_no_error(ps_rgb(ps, method = "cmds"))
      expect_no_error(ps_rgb(ps_add_dissim(ps_simulate(spatial_type = "none")), method = "cmds"))
})

Try the phylospatial package in your browser

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

phylospatial documentation built on June 8, 2025, 1:14 p.m.