Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
9d52672
Add datasets_selected argument
llrs-roche Jan 8, 2025
4cab9d5
Use datasets_selected for datanames
llrs-roche Jan 8, 2025
01af1e5
Add datasets_selected
llrs-roche Jan 8, 2025
7d1d1e9
Improve checks on datasets_selected
llrs-roche Jan 8, 2025
f64f3a0
Rstudio new version adds an id
llrs-roche Jan 8, 2025
f23555d
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 8, 2025
766a3c6
Rename argument
llrs-roche Jan 9, 2025
b782def
Rename datasets_selected to datanames
llrs-roche Jan 10, 2025
18791db
Deprecate show_metadata and use datanames
llrs-roche Jan 10, 2025
4a3682c
Update vignette
llrs-roche Jan 10, 2025
02e0408
Add tests checking deprecated arguments
llrs-roche Jan 10, 2025
441d069
Add NEWS entry
llrs-roche Jan 10, 2025
677075f
Correct example
llrs-roche Jan 10, 2025
24537f3
Style the R files
llrs-roche Jan 10, 2025
0bbce3a
Remove trailing commas
llrs-roche Jan 10, 2025
2708f8f
Merge branch 'main' into 821_select_datanames@main
llrs-roche Jan 10, 2025
fc4174e
Merge commit '268a6040c2143cd8e440a386b8334e2a41f008ce'
llrs-roche Jan 10, 2025
e2ebc56
Merge branch '821_select_datanames@main' of https://github.com/insigh…
llrs-roche Jan 10, 2025
af4143a
Apply suggestions from code review
llrs-roche Jan 10, 2025
0f8eae8
Fix superlinter issue (line > 120 character)
llrs-roche Jan 10, 2025
3b70824
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 10, 2025
341e039
Merge branch '821_select_datanames@main' of https://github.com/insigh…
llrs-roche Jan 10, 2025
883d667
Soft deprecate & use datasets_selected argument when possible
llrs-roche Jan 10, 2025
e6e5d10
Comment I missed when updating
llrs-roche Jan 10, 2025
6ba1998
Use full name of the function to avoid spelling false positives (and …
llrs-roche Jan 10, 2025
bd44f70
Prevent breaking user code and simplify code
llrs-roche Jan 10, 2025
111d2e5
[skip style] [skip vbump] Restyle files
github-actions[bot] Jan 10, 2025
59401be
Apply suggestions from code review
llrs-roche Jan 10, 2025
1493152
[skip style] [skip vbump] Restyle files
github-actions[bot] Jan 10, 2025
f108aa4
Keep the same default as before the PR and check if it is used before…
llrs-roche Jan 10, 2025
a591612
Remove unnecessary call
llrs-roche Jan 10, 2025
d79fee8
Add back the button control with datanames
llrs-roche Jan 10, 2025
60f9544
The default matches before this PR
llrs-roche Jan 10, 2025
1a40f0f
Styler changes
llrs-roche Jan 10, 2025
bd25c85
Update NEWS according to changes and discussion
llrs-roche Jan 10, 2025
1d1c716
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 10, 2025
478f9c9
Merge branch '821_select_datanames@main' of https://github.com/insigh…
llrs-roche Jan 10, 2025
e115f24
Use "all" instead of c("all", parent_dataname)
llrs-roche Jan 13, 2025
4e7265a
Convert check to one line
llrs-roche Jan 13, 2025
cb72e2a
Add lifecycle as a dependency
llrs-roche Jan 13, 2025
e5e29e0
Use deprecated() and missing
llrs-roche Jan 13, 2025
5fcca60
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 13, 2025
6faefc9
Use NULL as character0 is not accepted by teal::module(datanames)
llrs-roche Jan 14, 2025
9d85b7f
Merge branch '821_select_datanames@main' of https://github.com/insigh…
llrs-roche Jan 14, 2025
3c4ddb5
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 14, 2025
1a691ae
Add warning check (uncommited by error on last PR)
llrs-roche Jan 14, 2025
201576e
Merge branch '821_select_datanames@main' of https://github.com/insigh…
llrs-roche Jan 14, 2025
d7fe392
Import and no reassign
llrs-roche Jan 14, 2025
2da5d0b
Remove unnecessary NEWS entry
llrs-roche Jan 14, 2025
ba2b037
Shorter datasets_selected argument and remove the datanames' argument…
llrs-roche Jan 14, 2025
53ac5be
Use identical instead of !=
llrs-roche Jan 14, 2025
6f08e3d
Correct typo, shorten datases_selected argument's description, remove…
llrs-roche Jan 14, 2025
cc70989
Update documentation with feedback and typos corrected
llrs-roche Jan 14, 2025
7bd66d5
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 14, 2025
8545235
Update R/tm_variable_browser.R
llrs-roche Jan 14, 2025
c157c80
Remove tests
llrs-roche Jan 14, 2025
24db467
Merge branch 'main' into 821_select_datanames@main
llrs-roche Jan 15, 2025
4b2eba2
Set parent_dataname that matches data available
llrs-roche Jan 16, 2025
d28c934
Documentation update
llrs-roche Jan 16, 2025
2966292
[skip style] [skip vbump] Restyle files
github-actions[bot] Jan 16, 2025
999bdbd
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 16, 2025
cdfe6f7
Keep order or datanames
llrs-roche Jan 17, 2025
4f8e966
Merge branch '821_select_datanames@main' of https://github.com/insigh…
llrs-roche Jan 17, 2025
25d872e
Merge branch 'main' into 821_select_datanames@main
llrs-roche Jan 17, 2025
7485958
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 17, 2025
a561700
Fix broken merge
llrs-roche Jan 17, 2025
0deb55e
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Jan 17, 2025
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
15 changes: 13 additions & 2 deletions R/tm_front_page.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#' @param footnotes (`character` vector) of text to be shown at the bottom of the module, for each
#' element, if named the name is shown first in bold, followed by the value.
#' @param show_metadata (`logical`) indicating whether the metadata of the datasets be available on the module.
#' @inheritParams tm_variable_browser
#'
#' @inherit shared_params return
#'
Expand Down Expand Up @@ -69,7 +70,8 @@ tm_front_page <- function(label = "Front page",
tables = list(),
additional_tags = tagList(),
footnotes = character(0),
show_metadata = FALSE) {
show_metadata = FALSE,
datasets_selected = character(0L)) {
message("Initializing tm_front_page")

# Start of assertions
Expand All @@ -79,18 +81,27 @@ tm_front_page <- function(label = "Front page",
checkmate::assert_multi_class(additional_tags, classes = c("shiny.tag.list", "html"))
checkmate::assert_character(footnotes, min.len = 0, any.missing = FALSE)
checkmate::assert_flag(show_metadata)
checkmate::assert_character(datasets_selected, min.len = 0, min.chars = 1)

# End of assertions

# Make UI args
args <- as.list(environment())
datanames <- if (show_metadata && length(datasets_selected) > 0L) {
datasets_selected
} else if (show_metadata) {
"all"
} else {
NULL
}

ans <- module(
label = label,
server = srv_front_page,
ui = ui_front_page,
ui_args = args,
server_args = list(tables = tables, show_metadata = show_metadata),
datanames = if (show_metadata) "all" else NULL
datanames = datanames
)
attr(ans, "teal_bookmarkable") <- TRUE
ans
Expand Down
6 changes: 5 additions & 1 deletion R/tm_missing_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#'
#' @inheritParams teal::module
#' @inheritParams shared_params
#' @inheritParams tm_data_table
#' @param parent_dataname (`character(1)`) Specifies the parent dataset name. Default is `ADSL` for `CDISC` data.
#' If provided and exists, enables additional analysis "by subject". For non-`CDISC` data, this parameter can be
#' ignored.
Expand Down Expand Up @@ -110,6 +111,7 @@
tm_missing_data <- function(label = "Missing data",
plot_height = c(600, 400, 5000),
plot_width = NULL,
datasets_selected = character(0L),
parent_dataname = "ADSL",
ggtheme = c("classic", "gray", "bw", "linedraw", "light", "dark", "minimal", "void"),
ggplot2_args = list(
Expand Down Expand Up @@ -143,6 +145,7 @@ tm_missing_data <- function(label = "Missing data",
lower = plot_width[2], upper = plot_width[3], null.ok = TRUE, .var.name = "plot_width"
)

checkmate::assert_character(datasets_selected, min.len = 0, min.chars = 1)
checkmate::assert_character(parent_dataname, min.len = 0, max.len = 1)
ggtheme <- match.arg(ggtheme)

Expand All @@ -158,9 +161,11 @@ tm_missing_data <- function(label = "Missing data",
assert_decorators(decorators, null.ok = TRUE, names = available_decorators)
# End of assertions

datasets_selected <- unique(datasets_selected)
ans <- module(
label,
server = srv_page_missing_data,
datanames = if (length(datasets_selected) == 0) "all" else datasets_selected,
server_args = list(
parent_dataname = parent_dataname,
plot_height = plot_height,
Expand All @@ -170,7 +175,6 @@ tm_missing_data <- function(label = "Missing data",
decorators = decorators
),
ui = ui_page_missing_data,
datanames = "all",
ui_args = list(pre_output = pre_output, post_output = post_output)
)
attr(ans, "teal_bookmarkable") <- TRUE
Expand Down
2 changes: 1 addition & 1 deletion R/tm_variable_browser.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ tm_variable_browser <- function(label = "Variable Browser",
label,
server = srv_variable_browser,
ui = ui_variable_browser,
datanames = "all",
datanames = if (length(datasets_selected) == 0) "all" else datasets_selected,
server_args = list(
datasets_selected = datasets_selected,
parent_dataname = parent_dataname,
Expand Down
8 changes: 7 additions & 1 deletion man/tm_front_page.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions man/tm_missing_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions teal.modules.general.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: da9d7aac-6635-4d40-a6f3-881a397ffae1

RestoreWorkspace: No
SaveWorkspace: No
Expand Down
Loading