Skip to content

Commit

Permalink
invariant-ambig case
Browse files Browse the repository at this point in the history
We expect all states to be mapped to 0, as it's unparsimonious to propose an additional state.

Still feels unsatisfactory though..?
  • Loading branch information
ms609 committed Feb 17, 2025
1 parent 295a3a3 commit 1111907
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 3 deletions.
80 changes: 80 additions & 0 deletions tests/testthat/_snaps/PlotCharacter/plotchar-invar-ambig.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions tests/testthat/_snaps/PlotCharacter/plotchar-invariant.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions tests/testthat/test-PlotCharacter.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,14 @@ test_that("PlotCharacter.multi()", {

skip_if_not_installed("vdiffr")
vdiffr::expect_doppelganger("PlotChar_consensus", function() {
par(mfrow = c(2, 2), mar = rep(0, 4))
PlotCharacter(trees, dat)
})
vdiffr::expect_doppelganger("PlotChar_invariant", function() {
inv <- TreeTools::StringToPhyDat("00000000", tips = a..h)
PlotCharacter(trees, inv)
}
)
})
vdiffr::expect_doppelganger("PlotChar_invar_ambig", function() {
invq <- TreeTools::StringToPhyDat("000?00?{01}", tips = a..h)
PlotCharacter(trees, invq)
})
})

0 comments on commit 1111907

Please sign in to comment.