mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 23:21:56 +02:00
(v1.5.0.9025) big plot and ggplot generics update
This commit is contained in:
@ -43,9 +43,17 @@ test_that("disk works", {
|
||||
expect_s3_class(x, "disk")
|
||||
|
||||
pdf(NULL) # prevent Rplots.pdf being created
|
||||
expect_silent(barplot(as.disk(c(10, 20, 40))))
|
||||
expect_silent(plot(as.disk(c(10, 20, 40))))
|
||||
|
||||
expect_silent(plot(as.disk(c(10, 20, 40)), expand = FALSE))
|
||||
expect_silent(plot(as.disk(c(10, 20, 40)), mo = "esco", ab = "cipr"))
|
||||
if (require("ggplot2")) {
|
||||
expect_s3_class(ggplot(as.disk(c(10, 20, 40))), "gg")
|
||||
expect_s3_class(ggplot(as.disk(c(10, 20, 40)), expand = FALSE), "gg")
|
||||
expect_s3_class(ggplot(as.disk(c(10, 20, 40)), mo = "esco", ab = "cipr"), "gg")
|
||||
}
|
||||
expect_output(print(as.disk(12)))
|
||||
|
||||
library(dplyr, warn.conflicts = FALSE)
|
||||
expect_output(print(tibble(d = as.disk(12))))
|
||||
|
||||
|
@ -51,6 +51,13 @@ test_that("mic works", {
|
||||
pdf(NULL) # prevent Rplots.pdf being created
|
||||
expect_silent(barplot(as.mic(c(1, 2, 4, 8))))
|
||||
expect_silent(plot(as.mic(c(1, 2, 4, 8))))
|
||||
expect_silent(plot(as.mic(c(1, 2, 4, 8)), expand = FALSE))
|
||||
expect_silent(plot(as.mic(c(1, 2, 4, 8)), mo = "esco", ab = "cipr"))
|
||||
if (require("ggplot2")) {
|
||||
expect_s3_class(ggplot(as.mic(c(1, 2, 4, 8))), "gg")
|
||||
expect_s3_class(ggplot(as.mic(c(1, 2, 4, 8)), expand = FALSE), "gg")
|
||||
expect_s3_class(ggplot(as.mic(c(1, 2, 4, 8, 32)), mo = "esco", ab = "cipr"), "gg")
|
||||
}
|
||||
expect_output(print(as.mic(c(1, 2, 4, 8))))
|
||||
|
||||
expect_equal(summary(as.mic(c(2, 8))),
|
||||
|
Reference in New Issue
Block a user