Skip to content

Commit a630678

Browse files
committed
Update header of function
1 parent aa2e10b commit a630678

3 files changed

Lines changed: 29 additions & 11 deletions

File tree

R/helper_functions.R

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ filter_data <- function(dataset, arm_var, sel_arm, lb_test_var, sel_lb_test) {
132132
#'
133133
#' @param dataset `[data.frame]`
134134
#'
135-
#' A dataframe containing the variables listed below as columns.
135+
#' A data frame containing the variables listed below as columns.
136136
#' @param subjectid_var `[character(1)]`
137137
#'
138138
#' Name of the variable containing the unique subject IDs.
@@ -175,7 +175,7 @@ derive_req_vars <- function(
175175
return(NULL)
176176
}
177177

178-
# Get the data-frame in required structure (Pivot wider grouped by certain variables)
178+
# Get the data frame in required structure (Pivot wider grouped by certain variables)
179179
dataset <- dataset %>%
180180
dplyr::filter(.data[[lb_test_var]] %in% c(sel_x, sel_y)) %>%
181181
dplyr::mutate(
@@ -205,7 +205,7 @@ derive_req_vars <- function(
205205
#'
206206
#' @param dataset `[data.frame]`
207207
#'
208-
#' A dataframe containing the variables listed below as columns.
208+
#' A data frame containing the variables listed below as columns.
209209
#' @param subjectid_var `[character(1)]`
210210
#'
211211
#' Name of the variable containing the unique subject IDs.
@@ -229,6 +229,24 @@ derive_req_vars <- function(
229229
#'
230230
#' Character specifying the plot type for the y-axis. This leads to
231231
#' using the `dataset`'s column "r_<y_plot_type>_<y_sel>" for the y-values.
232+
#' @param x_ref_line_num `[numeric(1)]`
233+
#'
234+
#' Numeric specifying the reference line for the x-axis.
235+
#' @param y_ref_line_num `[numeric(1)]`
236+
#'
237+
#' Numeric specifying the reference line for the y-axis.
238+
#' @param x_rng_lower `[numeric(1)]`
239+
#'
240+
#' Numeric specifying the lower point in the x-axis range.
241+
#' @param x_rng_upper `[numeric(1)]`
242+
#'
243+
#' Numeric specifying the upper point in the x-axis range.
244+
#' @param y_rng_lower `[numeric(1)]`
245+
#'
246+
#' Numeric specifying the lower point in the y-axis range.
247+
#' @param y_rng_upper `[numeric(1)]`
248+
#'
249+
#' Numeric specifying the upper point in the y-axis range.
232250
#'
233251
#' @return A plotly object specifying the generated eDISH plot.
234252
#'

R/mod_edish.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ edish_UI <- function(module_id) {
6666
inputId = ns(EDISH$X_RNG_ID),
6767
label = "Range",
6868
value = c(NA, NA),
69-
#min = 0,
70-
#max = 100,
69+
min = 0,
70+
max = 100,
7171
step = 0.1
7272
),
7373
shiny::radioButtons(
@@ -94,8 +94,8 @@ edish_UI <- function(module_id) {
9494
inputId = ns(EDISH$Y_RNG_ID),
9595
label = "Range",
9696
value = c(NA, NA),
97-
#min = 0,
98-
#max = 100,
97+
min = 0,
98+
max = 100,
9999
step = 0.1
100100
),
101101
shiny::radioButtons(

tests/testthat/test-05-mod_edish.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ test_that("the app's state is restored when bookmarking" %>%
6464
app_bmk$set_inputs(`edish-x_axis` = "test 2")
6565
app_bmk$set_inputs(`edish-x_ref` = 4)
6666
app_bmk$set_inputs(`edish-x_plot_type` = "Baseline")
67-
app_bmk$set_inputs(`edish-x_rng` = c(0, 5))
68-
app_bmk$set_inputs(`edish-y_rng` = c(0, 7))
67+
app_bmk$set_inputs(`edish-x_rng` = c(0, 5.1))
68+
app_bmk$set_inputs(`edish-y_rng` = c(0, 7.1))
6969

7070
# Bookmark
7171
app_bmk$set_inputs(!!"._bookmark_" := "click") # nolint
@@ -88,8 +88,8 @@ test_that("the app's state is restored when bookmarking" %>%
8888
`edish-x_axis` = "test 2",
8989
`edish-x_plot_type` = "Baseline",
9090
`edish-x_ref` = 4,
91-
`edish-x_rng` = c(0, 5),
92-
`edish-y_rng` = c(0, 7)
91+
`edish-x_rng` = c(0, 5.1),
92+
`edish-y_rng` = c(0, 7.1)
9393
)
9494
)
9595
testthat::expect_identical(actual, expected)

0 commit comments

Comments
 (0)