Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# gfoRmulaICE: Parametric Iterative Conditional Expectation G-Formula
<!-- badges: start -->
![CRAN Version](https://www.r-pkg.org/badges/version/gfoRmulaICE)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/gfoRmulaICE)](https://cran.r-project.org/package=gfoRmulaICE)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
[![R-CMD-check](https://github.com/CausalInference/gfoRmulaICE/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/CausalInference/gfoRmulaICE/actions/workflows/R-CMD-check.yaml)
![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/gfoRmulaICE)
Expand Down
36 changes: 21 additions & 15 deletions tests/testthat/test_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ test_that(
)

plot1 <- plot(ice_fit1)
expect_equal(class(plot1), c("gg", "ggplot"))
expect_s3_class(plot1, "ggplot")
})

# -------------------------------------------------------------------------


test_that(
"check different interventions",
{
Expand All @@ -49,7 +52,7 @@ test_that(
)

plot2 <- plot(ice_fit2)
expect_equal(class(plot2), c("gg", "ggplot"))
expect_s3_class(plot2, "ggplot")
})

test_that(
Expand All @@ -74,7 +77,7 @@ test_that(
)

plot3 <- plot(ice_fit3)
expect_equal(class(plot3), c("gg", "ggplot"))
expect_s3_class(plot3, "ggplot")
})

test_that(
Expand All @@ -101,7 +104,7 @@ test_that(
)

plot4a <- plot(ice_fit4a)
expect_equal(class(plot4a), c("gg", "ggplot"))
expect_s3_class(plot4a, "ggplot")
})

test_that(
Expand Down Expand Up @@ -129,9 +132,12 @@ test_that(
)

plot4b <- plot(ice_fit4b)
expect_equal(class(plot4b), c("gg", "ggplot"))
expect_s3_class(plot4b, "ggplot")
})

# -------------------------------------------------------------------------


test_that(
"plot hazard-based pooled ICE - pooled-over-time hazard model",
{
Expand All @@ -158,7 +164,7 @@ test_that(
)

plot4c <- plot(ice_fit4c)
expect_equal(class(plot4c), c("gg", "ggplot"))
expect_s3_class(plot4c, "ggplot")
})

test_that(
Expand All @@ -184,7 +190,7 @@ test_that(
)

plot4d <- plot(ice_fit4d)
expect_equal(class(plot4d), c("gg", "ggplot"))
expect_s3_class(plot4d, "ggplot")
})

test_that(
Expand Down Expand Up @@ -212,7 +218,7 @@ test_that(
)

plot4e <- plot(ice_fit4e)
expect_equal(class(plot4e), c("gg", "ggplot"))
expect_s3_class(plot4e, "ggplot")
})

test_that(
Expand All @@ -238,7 +244,7 @@ test_that(
)

plot4f <- plot(ice_fit4f)
expect_equal(class(plot4f), c("gg", "ggplot"))
expect_s3_class(plot4f, "ggplot")
})

test_that(
Expand Down Expand Up @@ -267,7 +273,7 @@ test_that(
)

plot4h <- plot(ice_fit4h)
expect_equal(class(plot4h), c("gg", "ggplot"))
expect_s3_class(plot4h, "ggplot")
})

test_that(
Expand All @@ -293,7 +299,7 @@ test_that(
)

plot5a <- plot(ice_fit5a)
expect_equal(class(plot5a), c("gg", "ggplot"))
expect_s3_class(plot5a, "ggplot")
})

test_that(
Expand All @@ -319,7 +325,7 @@ test_that(
)

plot5b <- plot(ice_fit5b)
expect_equal(class(plot5b), c("gg", "ggplot"))
expect_s3_class(plot5b, "ggplot")
})

test_that(
Expand Down Expand Up @@ -348,7 +354,7 @@ test_that(
)

plot6a <- plot(ice_fit6a)
expect_equal(class(plot6a), c("gg", "ggplot"))
expect_s3_class(plot6a, "ggplot")
})

test_that(
Expand All @@ -375,7 +381,7 @@ test_that(
)

plot6b <- plot(ice_fit6b)
expect_equal(class(plot6b), c("gg", "ggplot"))
expect_s3_class(plot6b, "ggplot")
})

test_that(
Expand Down Expand Up @@ -531,7 +537,7 @@ test_that(

plots <- plot(ice_fit7a, ice_fit7b, ice_fit7c, ice_fit7d,
ice_fit7e, ice_fit7f, ice_fit7g, ice_fit7h)
expect_equal(class(plots), c("gg", "ggplot"))
expect_s3_class(plots, "ggplot")

})

Loading