Skip to content

Commit 3905f6a

Browse files
authored
ID:318021 [dv.papo] default_analysis_params not documented (#42)
* Add `default_analysis_params` argument documentation * Fix incorrect rendering for parameter documentation auto-generation * Improve x_axis_breaks formatting
1 parent 31f8032 commit 3905f6a

File tree

8 files changed

+67
-49
lines changed

8 files changed

+67
-49
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dv.papo
22
Title: Patient Profile
3-
Version: 2.1.1-9001
3+
Version: 2.1.1-9002
44
Authors@R:
55
c(person("Boehringer-Ingelheim Pharma GmbH & Co.KG", role = c("cph", "fnd")),
66
person(given = "Korbinian",

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# dv.papo 2.1.1-9002
2+
3+
- Add `default_analysis_params` argument documentation (previously missed out)
4+
15
# dv.papo 2.1.1-9001
26

37
- Fixed issue where setting analysis_indicator to NULL caused loss of plot legend.

R/dressing_room.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ T_get_use_as_text_lines <- function(elem) {
139139
res <- "Represents a CDISC (non-zero) Study Day"
140140
} else if (elem$kind == "color") {
141141
res <- "Contains either an HTML (#xxxxxx) or an R color"
142-
} else if (elem$kind %in% c("integer", "character", "group")) {
142+
} else if (elem$kind %in% c("integer", "character", "group", "or")) {
143143
# nothing
144144
} else {
145145
message(paste("Missing use for kind", elem$kind))

R/mod_API.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ mod_patient_profile_API_docs <- list(
1717
),
1818
plots = list(
1919
"Plot section",
20-
x_axis_unit = "Defines the units of the x axis in the plots",
21-
x_axis_breaks = "When a single integer is passed it will use `base::pretty` to compute a set of breakpoints. If more than one value is passed it will use those breaks in the x axis",
20+
x_axis_unit = 'Defines the time units of the x-axis in the plots. Expects `["weeks"/"days"]` values. Defaults to `"days"`',
21+
x_axis_breaks = "Defines how many breaks will be used in the x-axis. When a single integer is passed it will use `base::pretty` to compute that number of breaks. If more than one value is passed it will use those breaks in the x-axis (e.g. if `c(1, 2, 3)` is passed it will show breaks at days/weeks 1, 2 and 3). Defaults to `5`",
2222
timeline_info = list(
2323
"Start and end study dates",
2424
icf_date = "Informed Consent Form signing Date",
@@ -52,10 +52,10 @@ mod_patient_profile_API_docs <- list(
5252
range_high_limit = "Upper limit of the reference range",
5353
summary_stats = "Additional value column for summary statistics"
5454
),
55-
tooltip = "Block of text to display as hover information over each point of the trace. The names of this list are included as literal text and honor three basic HTML formatting elements: `<b>`, `<i>`, `<br>`). The columns the values refer to are populated with the value on the dataset relevant to any given row"
56-
#, default_analysis_params = "A vector of character values specifying the default analysis parameters (values from the variable specified by `analysis_param`) to display" # TODO(miguel): Add when module is ported to CM+TC # nolint
55+
tooltip = "Block of text to display as hover information over each point of the trace. The names of this list are included as literal text and honor three basic HTML formatting elements: `<b>`, `<i>`, `<br>`). The columns the values refer to are populated with the value on the dataset relevant to any given row",
56+
default_analysis_params = "A vector of character values specifying the default analysis parameters (values from the variable specified by `analysis_param`) to display"
5757
),
58-
vline_vars = "Place vertical dashed lines on days indicated by this dataset columns",
58+
vline_vars = "Place vertical dashed lines on days indicated by these dataset columns",
5959
vline_day_numbers = "Place vertical dashed lines on days indicated by this parameter",
6060
palette = "If a name on this list matches the text on a plot element, the associated color will be applied to that element. This mapping takes precedence over the built-in palette"
6161
)
@@ -76,7 +76,7 @@ mod_patient_profile_API <- T_group(
7676
) |> T_flag("optional", "zero_or_more", "named"),
7777
plots = T_group(
7878
x_axis_unit = T_character() |> T_flag("optional"),
79-
x_axis_breaks = T_integer(min = 1) |> T_flag("optional", "zero_or_more", "as_array"),
79+
x_axis_breaks = T_or(T_integer(), T_numeric()) |> T_flag("zero_or_more") |> T_flag("optional"),
8080
timeline_info = T_group(
8181
icf_date = T_col("subject_level_dataset_name", T_or(T_date(), T_datetime())) |> T_flag("optional"),
8282
trt_start_date = T_col("subject_level_dataset_name", T_or(T_date(), T_datetime())),
@@ -105,8 +105,8 @@ mod_patient_profile_API <- T_group(
105105
range_high_limit = T_col("dataset", T_numeric()) |> T_flag("optional"),
106106
summary_stats = T_col("dataset", T_numeric()) |> T_flag("optional")
107107
) |> T_flag("as_array"),
108-
tooltip = T_col("dataset") |> T_flag("zero_or_more", "named", "as_array")
109-
#, default_analysis_params = T_choice_from_col_contents("vars/analysis_param", T_or(T_character(), T_factor())) |> T_flag("optional") # TODO(miguel): Add when module is ported to CM+TC # nolint
108+
tooltip = T_col("dataset") |> T_flag("zero_or_more", "named", "as_array"),
109+
default_analysis_params = T_character() |> T_flag("zero_or_more") |> T_flag("optional")
110110
) |> T_flag("zero_or_more", "named"),
111111
vline_vars = T_col(
112112
"subject_level_dataset_name", T_or(T_CDISC_study_day(), T_date(), T_datetime())

R/mod_signature.R

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,16 @@
4444
#' Plot section.
4545
#' Composed of:
4646
#' * x_axis_unit
47-
#' `["weeks"|"days"]`
48-
#' Defines the units for the time x-axis.
49-
# Defaults to `"days"`.
50-
#'
47+
#' `[character]` (optional)
48+
#' Defines the time units of the x-axis in the plots. Expects `["weeks"/"days"]`
49+
#' values. Defaults to `"days"`.
5150
#' * x_axis_breaks
52-
#' `[integer(1)|numeric(2+)]`
53-
#' (optional)
54-
#' Defines how many breaks will be used in the time x-axis. When a single integer is passed it will use `base::pretty`
55-
#' to compute that number of breaks. If more than one value is passed it will use those breaks in the x-axis (e.g.
56-
#' if c(1,2,3) is passed it will show breaks at days/weeks 1,2 and 3).
57-
#' Defaults to `5`.
58-
#'
51+
#' `[integer|numeric(n)]` (optional)
52+
#' Defines how many breaks will be used in the x-axis. When a single integer is
53+
#' passed it will use `base::pretty` to compute that number of breaks. If more
54+
#' than one value is passed it will use those breaks in the x-axis (e.g. if `c(1,
55+
#' 2, 3)` is passed it will show breaks at days/weeks 1, 2 and 3). Defaults to
56+
#' `5`.
5957
#' * timeline_info
6058
#' `[list]`
6159
#' Start and end study dates.
@@ -164,9 +162,13 @@
164162
#' formatting elements: `<b>`, `<i>`, `<br>`). The columns the values refer to are
165163
#' populated with the value on the dataset relevant to any given row.
166164
#' Indexes into dataset `dataset`.
165+
#' * default_analysis_params
166+
#' `[character(n)]` (optional)
167+
#' A vector of character values specifying the default analysis parameters (values
168+
#' from the variable specified by `analysis_param`) to display.
167169
#' * vline_vars
168170
#' `[character(n)]`
169-
#' Place vertical dashed lines on days indicated by this dataset columns.
171+
#' Place vertical dashed lines on days indicated by these dataset columns.
170172
#' Indexes into dataset `subject_level_dataset_name`. Expects
171173
#' `[integer|Date|POSIXt]` values.
172174
#' * vline_day_numbers

man/mod_patient_profile.Rd

Lines changed: 13 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mod_patient_profile_params.Rd

Lines changed: 13 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mod_patient_profile_server.Rd

Lines changed: 13 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)