Skip to content

Commit 40f053a

Browse files
committed
Merge branch 'main' into 1187_decorate_output@main
2 parents 8e8457d + cd8ac9d commit 40f053a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+782
-487
lines changed

.github/workflows/scheduled.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@ jobs:
5656
)
5757
name: revdepcheck ↩️
5858
uses: insightsengineering/r.pkg.template/.github/workflows/revdepcheck.yaml@main
59+
with:
60+
lookup-refs: |
61+
insightsengineering/roxy.shinylive
62+
insightsengineering/teal
63+
insightsengineering/teal.transform
64+
insightsengineering/teal.code
65+
insightsengineering/teal.data
66+
insightsengineering/teal.slice
67+
insightsengineering/teal.logger
68+
insightsengineering/teal.reporter
69+
insightsengineering/teal.widgets
70+
insightsengineering/tern
71+
insightsengineering/rtables
5972
rhub:
6073
if: >
6174
github.event_name == 'schedule' || (
@@ -66,10 +79,12 @@ jobs:
6679
uses: insightsengineering/r.pkg.template/.github/workflows/rhub.yaml@main
6780
with:
6881
lookup-refs: |
82+
insightsengineering/roxy.shinylive
6983
insightsengineering/teal
7084
insightsengineering/teal.transform
7185
insightsengineering/teal.code
7286
insightsengineering/teal.data
87+
insightsengineering/teal.slice
7388
insightsengineering/teal.logger
7489
insightsengineering/teal.reporter
7590
insightsengineering/teal.widgets

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ vignettes/*.R
2929
coverage.*
3030
tests/testthat/_snaps/**/*.new.md
3131
tests/testthat/_snaps/**/*.new.svg
32+
/doc/
33+
/Meta/

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
# All available hooks: https://pre-commit.com/hooks.html
33
# R specific hooks: https://github.com/lorenzwalthert/precommit
4-
default_stages: [commit]
4+
default_stages: [pre-commit]
55
default_language_version:
66
python: python3
77
repos:
88
- repo: https://github.com/lorenzwalthert/precommit
9-
rev: v0.4.3.9001
9+
rev: v0.4.3.9003
1010
hooks:
1111
- id: style-files
1212
name: Style code with `styler`
@@ -18,8 +18,6 @@ repos:
1818
- ggmosaic
1919
- ggplot2
2020
- shiny
21-
- teal
22-
- teal.transform
2321
- checkmate
2422
- dplyr
2523
- DT
@@ -33,6 +31,9 @@ repos:
3331
- shinyWidgets
3432
- stats
3533
- stringr
34+
- insightsengineering/roxy.shinylive
35+
- insightsengineering/teal
36+
- insightsengineering/teal.transform
3637
- insightsengineering/teal.code
3738
- insightsengineering/teal.data
3839
- insightsengineering/teal.logger

DESCRIPTION

Lines changed: 13 additions & 11 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.3.0.9049
5-
Date: 2024-09-17
4+
Version: 0.3.0.9054
5+
Date: 2024-11-08
66
Authors@R: c(
77
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre")),
88
person("Pawel", "Rucki", , "[email protected]", role = "aut"),
@@ -27,8 +27,8 @@ Depends:
2727
ggplot2 (>= 3.4.0),
2828
R (>= 3.6),
2929
shiny (>= 1.6.0),
30-
teal (>= 0.15.2.9052),
31-
teal.transform (>= 0.5.0)
30+
teal (>= 0.15.2.9079),
31+
teal.transform (>= 0.5.0.9015)
3232
Imports:
3333
checkmate (>= 2.1.0),
3434
dplyr (>= 1.0.5),
@@ -42,8 +42,8 @@ Imports:
4242
shinyWidgets (>= 0.5.1),
4343
stats,
4444
stringr (>= 1.4.1),
45-
teal.code (>= 0.5.0),
46-
teal.data (>= 0.5.0),
45+
teal.code (>= 0.5.0.9012),
46+
teal.data (>= 0.6.0.9015),
4747
teal.logger (>= 0.2.0.9004),
4848
teal.reporter (>= 0.3.0),
4949
teal.widgets (>= 0.4.0),
@@ -71,14 +71,16 @@ Suggests:
7171
pkgload,
7272
rlang (>= 1.0.0),
7373
rmarkdown (>= 2.23),
74+
roxy.shinylive,
7475
rtables (>= 0.6.8),
7576
rvest,
7677
shinytest2,
7778
sparkline,
7879
testthat (>= 3.1.9),
7980
withr (>= 2.0.0)
8081
VignetteBuilder:
81-
knitr
82+
knitr,
83+
rmarkdown
8284
Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2,
8385
rstudio/shiny, insightsengineering/teal,
8486
insightsengineering/teal.transform, mllg/checkmate, tidyverse/dplyr,
@@ -92,12 +94,12 @@ Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2,
9294
aphalo/ggpmisc, aphalo/ggpp, slowkow/ggrepel, baddstats/goftest,
9395
ramnathv/htmlwidgets, jeroen/jsonlite, yihui/knitr, daroczig/logger,
9496
deepayan/lattice, insightsengineering/nestcolor, r-lib/pkgload,
95-
r-lib/rlang, rstudio/rmarkdown, insightsengineering/rtables,
96-
tidyverse/rvest, htmlwidgets/sparkline, rstudio/shinytest2,
97-
r-lib/testthat, r-lib/withr
97+
r-lib/rlang, rstudio/rmarkdown, insightsengineering/roxy.shinylive,
98+
insightsengineering/rtables, tidyverse/rvest, htmlwidgets/sparkline,
99+
rstudio/shinytest2, r-lib/testthat, r-lib/withr
98100
Config/Needs/website: insightsengineering/nesttemplate
99101
Encoding: UTF-8
100102
Language: en-US
101103
LazyData: true
102-
Roxygen: list(markdown = TRUE)
104+
Roxygen: list(markdown = TRUE, packages = c("roxy.shinylive"))
103105
RoxygenNote: 7.3.2

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# teal.modules.general 0.3.0.9049
1+
# teal.modules.general 0.3.0.9054
22

33
* Removed `Show Warnings` modals from modules.
44

R/tm_a_pca.R

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818
#'
1919
#' @inherit shared_params return
2020
#'
21+
#' @examplesShinylive
22+
#' library(teal.modules.general)
23+
#' interactive <- function() TRUE
24+
#' {{ next_example }}
2125
#' @examples
22-
#' library(teal.widgets)
23-
#'
2426
#' # general data example
2527
#' data <- teal_data()
2628
#' data <- within(data, {
2729
#' require(nestcolor)
2830
#' USArrests <- USArrests
2931
#' })
3032
#'
31-
#' datanames(data) <- "USArrests"
32-
#'
3333
#' app <- init(
3434
#' data = data,
3535
#' modules = modules(
@@ -45,9 +45,6 @@
4545
#' multiple = TRUE
4646
#' ),
4747
#' filter = NULL
48-
#' ),
49-
#' ggplot2_args = ggplot2_args(
50-
#' labs = list(subtitle = "Plot generated by PCA Module")
5148
#' )
5249
#' )
5350
#' )
@@ -56,14 +53,18 @@
5653
#' shinyApp(app$ui, app$server)
5754
#' }
5855
#'
56+
#' @examplesShinylive
57+
#' library(teal.modules.general)
58+
#' interactive <- function() TRUE
59+
#' {{ next_example }}
60+
#' @examples
5961
#' # CDISC data example
6062
#' data <- teal_data()
6163
#' data <- within(data, {
6264
#' require(nestcolor)
6365
#' ADSL <- rADSL
6466
#' })
65-
#' datanames(data) <- "ADSL"
66-
#' join_keys(data) <- default_cdisc_join_keys[datanames(data)]
67+
#' join_keys(data) <- default_cdisc_join_keys[names(data)]
6768
#'
6869
#' app <- init(
6970
#' data = data,
@@ -80,9 +81,6 @@
8081
#' multiple = TRUE
8182
#' ),
8283
#' filter = NULL
83-
#' ),
84-
#' ggplot2_args = ggplot2_args(
85-
#' labs = list(subtitle = "Plot generated by PCA Module")
8684
#' )
8785
#' )
8886
#' )

R/tm_a_regression.R

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,17 @@
5454
#' When function is provided object names don't need to match module's internal naming. For example
5555
#' `function(x) x <- x + ggtitle("Custom Title")`.
5656
#'
57+
#' @examplesShinylive
58+
#' library(teal.modules.general)
59+
#' interactive <- function() TRUE
60+
#' {{ next_example }}
5761
#' @examples
5862
#' # general data example
59-
#' library(teal.widgets)
60-
#'
6163
#' data <- teal_data()
6264
#' data <- within(data, {
6365
#' require(nestcolor)
6466
#' CO2 <- CO2
6567
#' })
66-
#' datanames(data) <- c("CO2")
6768
#'
6869
#' app <- init(
6970
#' data = data,
@@ -89,9 +90,6 @@
8990
#' multiple = TRUE,
9091
#' fixed = FALSE
9192
#' )
92-
#' ),
93-
#' ggplot2_args = ggplot2_args(
94-
#' labs = list(subtitle = "Plot generated by Regression Module")
9593
#' )
9694
#' )
9795
#' )
@@ -100,16 +98,18 @@
10098
#' shinyApp(app$ui, app$server)
10199
#' }
102100
#'
101+
#' @examplesShinylive
102+
#' library(teal.modules.general)
103+
#' interactive <- function() TRUE
104+
#' {{ next_example }}
105+
#' @examples
103106
#' # CDISC data example
104-
#' library(teal.widgets)
105-
#'
106107
#' data <- teal_data()
107108
#' data <- within(data, {
108109
#' require(nestcolor)
109110
#' ADSL <- rADSL
110111
#' })
111-
#' datanames(data) <- "ADSL"
112-
#' join_keys(data) <- default_cdisc_join_keys[datanames(data)]
112+
#' join_keys(data) <- default_cdisc_join_keys[names(data)]
113113
#'
114114
#' app <- init(
115115
#' data = data,
@@ -135,9 +135,6 @@
135135
#' multiple = TRUE,
136136
#' fixed = FALSE
137137
#' )
138-
#' ),
139-
#' ggplot2_args = ggplot2_args(
140-
#' labs = list(subtitle = "Plot generated by Regression Module")
141138
#' )
142139
#' )
143140
#' )
@@ -298,37 +295,37 @@ ui_a_regression <- function(id, decorators, ...) {
298295
conditionalPanel(
299296
condition = "input.plot_type == 'Response vs Regressor'",
300297
ns = ns,
301-
ui_teal_transform_module(ns("d_0"), transforms = decorators[[1]])
298+
ui_transform_data(ns("d_0"), transforms = decorators[[1]])
302299
),
303300
conditionalPanel(
304301
condition = "input.plot_type == 'Residuals vs Fitted'",
305302
ns = ns,
306-
ui_teal_transform_module(ns("d_1"), transforms = decorators[[1]])
303+
ui_transform_data(ns("d_1"), transforms = decorators[[1]])
307304
),
308305
conditionalPanel(
309306
condition = "input.plot_type == 'Normal Q-Q'",
310307
ns = ns,
311-
ui_teal_transform_module(ns("d_2"), transforms = decorators[[1]])
308+
ui_transform_data(ns("d_2"), transforms = decorators[[1]])
312309
),
313310
conditionalPanel(
314311
condition = "input.plot_type == 'Scale-Location'",
315312
ns = ns,
316-
ui_teal_transform_module(ns("d_3"), transforms = decorators[[1]])
313+
ui_transform_data(ns("d_3"), transforms = decorators[[1]])
317314
),
318315
conditionalPanel(
319316
condition = "input.plot_type == 'Cook\\'s distance'",
320317
ns = ns,
321-
ui_teal_transform_module(ns("d_4"), transforms = decorators[[1]])
318+
ui_transform_data(ns("d_4"), transforms = decorators[[1]])
322319
),
323320
conditionalPanel(
324321
condition = "input.plot_type == 'Residuals vs Leverage'",
325322
ns = ns,
326-
ui_teal_transform_module(ns("d_5"), transforms = decorators[[1]])
323+
ui_transform_data(ns("d_5"), transforms = decorators[[1]])
327324
),
328325
conditionalPanel(
329326
condition = "input.plot_type == 'Cook\\'s dist vs Leverage'",
330327
ns = ns,
331-
ui_teal_transform_module(ns("d_6"), transforms = decorators[[1]])
328+
ui_transform_data(ns("d_6"), transforms = decorators[[1]])
332329
),
333330
),
334331
checkboxInput(ns("show_outlier"), label = "Display outlier labels", value = TRUE),
@@ -1006,13 +1003,13 @@ srv_a_regression <- function(id,
10061003
)
10071004
})
10081005

1009-
decorated_output_0 <- srv_teal_transform_module(id = "d_0", data = output_plot_0, transforms = decorators[[1]])
1010-
decorated_output_1 <- srv_teal_transform_module(id = "d_1", data = output_plot_1, transforms = decorators[[1]])
1011-
decorated_output_2 <- srv_teal_transform_module(id = "d_2", data = output_plot_2, transforms = decorators[[1]])
1012-
decorated_output_3 <- srv_teal_transform_module(id = "d_3", data = output_plot_3, transforms = decorators[[1]])
1013-
decorated_output_4 <- srv_teal_transform_module(id = "d_4", data = output_plot_4, transforms = decorators[[1]])
1014-
decorated_output_5 <- srv_teal_transform_module(id = "d_5", data = output_plot_5, transforms = decorators[[1]])
1015-
decorated_output_6 <- srv_teal_transform_module(id = "d_6", data = output_plot_6, transforms = decorators[[1]])
1006+
decorated_output_0 <- srv_transform_data(id = "d_0", data = output_plot_0, transforms = decorators[[1]])
1007+
decorated_output_1 <- srv_transform_data(id = "d_1", data = output_plot_1, transforms = decorators[[1]])
1008+
decorated_output_2 <- srv_transform_data(id = "d_2", data = output_plot_2, transforms = decorators[[1]])
1009+
decorated_output_3 <- srv_transform_data(id = "d_3", data = output_plot_3, transforms = decorators[[1]])
1010+
decorated_output_4 <- srv_transform_data(id = "d_4", data = output_plot_4, transforms = decorators[[1]])
1011+
decorated_output_5 <- srv_transform_data(id = "d_5", data = output_plot_5, transforms = decorators[[1]])
1012+
decorated_output_6 <- srv_transform_data(id = "d_6", data = output_plot_6, transforms = decorators[[1]])
10161013

10171014

10181015
output_q <- reactive({

R/tm_data_table.R

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@
2929
#'
3030
#' @inherit shared_params return
3131
#'
32+
#' @examplesShinylive
33+
#' library(teal.modules.general)
34+
#' interactive <- function() TRUE
35+
#' {{ next_example }}
3236
#' @examples
3337
#' # general data example
3438
#' data <- teal_data()
3539
#' data <- within(data, {
3640
#' require(nestcolor)
3741
#' iris <- iris
3842
#' })
39-
#' datanames(data) <- c("iris")
4043
#'
4144
#' app <- init(
4245
#' data = data,
@@ -53,14 +56,18 @@
5356
#' shinyApp(app$ui, app$server)
5457
#' }
5558
#'
59+
#' @examplesShinylive
60+
#' library(teal.modules.general)
61+
#' interactive <- function() TRUE
62+
#' {{ next_example }}
63+
#' @examples
5664
#' # CDISC data example
5765
#' data <- teal_data()
5866
#' data <- within(data, {
5967
#' require(nestcolor)
6068
#' ADSL <- rADSL
6169
#' })
62-
#' datanames(data) <- "ADSL"
63-
#' join_keys(data) <- default_cdisc_join_keys[datanames(data)]
70+
#' join_keys(data) <- default_cdisc_join_keys[names(data)]
6471
#'
6572
#' app <- init(
6673
#' data = data,
@@ -187,7 +194,7 @@ srv_page_data_table <- function(id,
187194
if_filtered <- reactive(as.logical(input$if_filtered))
188195
if_distinct <- reactive(as.logical(input$if_distinct))
189196

190-
datanames <- isolate(teal.data::datanames(data()))
197+
datanames <- isolate(names(data()))
191198
datanames <- Filter(function(name) {
192199
is.data.frame(isolate(data())[[name]])
193200
}, datanames)

0 commit comments

Comments
 (0)