-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to set datanames
#824
base: main
Are you sure you want to change the base?
Changes from all commits
9d52672
4cab9d5
01af1e5
7d1d1e9
f64f3a0
f23555d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -110,6 +111,7 @@ | |
tm_missing_data <- function(label = "Missing data", | ||
plot_height = c(600, 400, 5000), | ||
plot_width = NULL, | ||
datasets_selected = character(0L), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I went with what is used in other modules, currently there are 2 modules using this argument: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be much easier if
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will do that and check what happens with |
||
parent_dataname = "ADSL", | ||
ggtheme = c("classic", "gray", "bw", "linedraw", "light", "dark", "minimal", "void"), | ||
ggplot2_args = list( | ||
|
@@ -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) | ||
|
||
|
@@ -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, | ||
|
@@ -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 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a gap here when
show_metadata = FALSE
andlength(datasets_selected)
. Thisshow_metadata
argument is unnecessary and I would suggest to deprecateshow_metadata
and to show metadata whendatasets_selected
is not empty. So:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On that condition
show_metadata
prevails and nothing would be shown... but I can deprecateshow_metadata
entirely.