Skip to content

Commit

Permalink
Fix for Issue #270
Browse files Browse the repository at this point in the history
tests: added test for `plotIndiv.mint.plsda()` with `ellipse = TRUE`
  • Loading branch information
Max-Bladen committed Nov 17, 2022
1 parent 98763bd commit 89bbaa7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/testthat/test-plotIndiv.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,20 @@ test_that("plotIndiv.sgccda(..., blocks = 'average') works with ellipse=TRUE", c
expect_true(all(unique(diablo_plot$df.ellipse$Block) %in% c('average', 'Block: mrna', 'average (weighted)')))
})

test_that("plotIndiv.mint.plsda() works with ellipse=TRUE", code = {

data(stemcells)
X <- stemcells$gene
Y <- stemcells$celltype
S <- stemcells$study

model <- mint.plsda(X, Y, study = S)

pl.res <- plotIndiv(model, ellipse = T)

.expect_numerically_close(pl.res$graph$data$x[10], -3.129)
.expect_numerically_close(pl.res$graph$data$y[20], -5.3516)
})

unlink(list.files(pattern = "*.pdf"))

0 comments on commit 89bbaa7

Please sign in to comment.