Skip to content

Commit 9ee851c

Browse files
authored
Merge branch 'main' into 937-plot_settings
2 parents 48ba050 + 9224446 commit 9ee851c

File tree

9 files changed

+25
-35
lines changed

9 files changed

+25
-35
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ repos:
1515
- id: roxygenize
1616
name: Regenerate package documentation
1717
additional_dependencies:
18-
- ggmosaic
1918
- ggplot2
2019
- shiny
2120
- insightsengineering/teal

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Type: Package
22
Package: teal.modules.general
33
Title: General Modules for 'teal' Applications
4-
Version: 0.5.0.9009
5-
Date: 2025-10-17
4+
Version: 0.5.1.9010
5+
Date: 2025-10-27
66
Authors@R: c(
77
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre")),
88
person("Pawel", "Rucki", , "[email protected]", role = "aut"),
@@ -23,7 +23,6 @@ URL: https://insightsengineering.github.io/teal.modules.general/,
2323
BugReports:
2424
https://github.com/insightsengineering/teal.modules.general/issues
2525
Depends:
26-
ggmosaic (>= 0.3.0),
2726
ggplot2 (>= 3.4.0),
2827
R (>= 4.1),
2928
shiny (>= 1.8.1),

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export(tm_missing_data)
2525
export(tm_outliers)
2626
export(tm_t_crosstable)
2727
export(tm_variable_browser)
28-
import(ggmosaic)
2928
import(ggplot2)
3029
import(shiny)
3130
import(teal)

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
# teal.modules.general 0.5.0.9009
1+
# teal.modules.general 0.5.1.9010
22

33
### Enhancements
44

55
- Modules now return a `teal_report` object that contains the data, code and reporter. All the reporter buttons were removed from the modules' UI.
66

7+
# teal.modules.general 0.5.1
8+
9+
- Removed ggmosaic package dependency to avoid being archived on CRAN (#932).
10+
711
# teal.modules.general 0.5.0
812

913
### Breaking changes

R/teal.modules.general.R

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#' (not necessarily for clinical trials data).
55
#'
66
#' @import ggplot2
7-
#' @import ggmosaic
87
#' @import shiny
98
#' @import teal
109
#' @import teal.transform
@@ -15,11 +14,5 @@
1514
#' @keywords internal
1615
"_PACKAGE"
1716

18-
# nolint start
19-
# Note ggmosaic (version <= 0.3.3) needs to be in DEPENDS as the following does not work if it is imported
20-
# df <- data.frame(x = c("A", "B", "C", "A"), y = c("Z", "Z", "W", "W"))
21-
# ggplot(df) + ggmosaic::geom_mosaic(aes(x = ggmosaic::product(x), fill = y))
22-
# nolint end
23-
2417
# Needed to avoid R CMD note on no visible binding
2518
utils::globalVariables("count")

R/tm_g_association.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ srv_tm_g_association <- function(id,
345345
teal.reporter::teal_card(obj),
346346
teal.reporter::teal_card("## Module's output(s)")
347347
)
348-
teal.code::eval_code(obj, 'library("ggplot2");library("dplyr");library("ggmosaic")') # nolint: quotes
348+
teal.code::eval_code(obj, 'library("ggplot2");library("dplyr")') # nolint: quotes
349349
})
350350
anl_merged_q <- reactive({
351351
req(anl_merged_input())

R/tm_g_bivariate.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -927,13 +927,7 @@ bivariate_ggplot_call <- function(x_class,
927927
)
928928
# Factor and character plots
929929
} else if (x_class == "factor" && y_class == "factor") {
930-
plot_call <- reduce_plot_call(
931-
plot_call,
932-
substitute(
933-
ggmosaic::geom_mosaic(aes(x = ggmosaic::product(xval), fill = yval), na.rm = TRUE),
934-
env = list(xval = x, yval = y)
935-
)
936-
)
930+
stop("Categorical variables 'x' and 'y' are currently not supported.")
937931
} else {
938932
stop("x y type combination not allowed")
939933
}

inst/WORDLIST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ UI
88
datatables
99
facetting
1010
funder
11+
ggmosaic
1112
ggplot
1213
pre
1314
qq

tests/testthat/test_bivariate_ggplot_call.R

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,34 @@ testthat::test_that("bivariate_ggplot_call with numerics", {
1919
})
2020

2121
testthat::test_that("bivariate_ggplot_call with factor, char, logical", {
22-
testthat::expect_match(
22+
error_message <- "Categorical variables 'x' and 'y' are currently not supported."
23+
testthat::expect_error(
2324
bivariate_ggplot_call("factor", "factor") %>% deparse(width.cutoff = 300),
24-
"geom_mosaic"
25+
error_message
2526
)
26-
testthat::expect_match(
27+
testthat::expect_error(
2728
bivariate_ggplot_call("logical", "factor") %>% deparse(width.cutoff = 300),
28-
"geom_mosaic"
29+
error_message
2930
)
30-
testthat::expect_match(
31+
testthat::expect_error(
3132
bivariate_ggplot_call("character", "factor") %>% deparse(width.cutoff = 300),
32-
"geom_mosaic"
33+
error_message
3334
)
34-
testthat::expect_match(
35+
testthat::expect_error(
3536
bivariate_ggplot_call("logical", "character") %>% deparse(width.cutoff = 300),
36-
"geom_mosaic"
37+
error_message
3738
)
38-
testthat::expect_match(
39+
testthat::expect_error(
3940
bivariate_ggplot_call("character", "logical") %>% deparse(width.cutoff = 300),
40-
"geom_mosaic"
41+
error_message
4142
)
42-
testthat::expect_match(
43+
testthat::expect_error(
4344
bivariate_ggplot_call("logical", "logical") %>% deparse(width.cutoff = 300),
44-
"geom_mosaic"
45+
error_message
4546
)
46-
testthat::expect_match(
47+
testthat::expect_error(
4748
bivariate_ggplot_call("character", "character") %>% deparse(width.cutoff = 300),
48-
"geom\\_mosaic"
49+
error_message
4950
)
5051
})
5152

0 commit comments

Comments
 (0)