(v1.6.0.9028) new unit test flow

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2021-05-13 22:44:11 +02:00
1 parent 5b9fb8daf4
commit 9ed2f6490f
31 files changed
+108 -99

No files matched your search

+9 -5
View File
@@ -49,10 +49,12 @@ test_that("PCA works", {
expect_s3_class(pca_model, "pca")
pdf(NULL) # prevent Rplots.pdf being created
ggplot_pca(pca_model, ellipse = TRUE)
ggplot_pca(pca_model, arrows_textangled = FALSE)
if (suppressWarnings(require("ggplot2"))) {
ggplot_pca(pca_model, ellipse = TRUE)
ggplot_pca(pca_model, arrows_textangled = FALSE)
}
if (require("dplyr")) {
if (suppressWarnings(require("dplyr"))) {
resistance_data <- example_isolates %>%
group_by(order = mo_order(mo),
genus = mo_genus(mo)) %>%
@@ -60,7 +62,9 @@ test_that("PCA works", {
pca_result <- resistance_data %>%
pca(AMC, CXM, CTX, CAZ, GEN, TOB, TMP, "SXT")
expect_s3_class(pca_result, "prcomp")
ggplot_pca(pca_result, ellipse = TRUE)
ggplot_pca(pca_result, ellipse = FALSE, arrows_textangled = FALSE, scale = FALSE)
if (suppressWarnings(require("ggplot2"))) {
ggplot_pca(pca_result, ellipse = TRUE)
ggplot_pca(pca_result, ellipse = FALSE, arrows_textangled = FALSE, scale = FALSE)
}
}
})