Skip to content

Commit

Permalink
update for checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ayogasekaram committed Nov 1, 2023
1 parent 8be9985 commit 00db6f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
18 changes: 7 additions & 11 deletions R/g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,7 @@ h_format_row <- function(x, format, labels = NULL) {
#' @param x (`character`)\cr x variable name.
#' @param y (`character`)\cr y variable name.
#' @param group_var (`character` or `NA`)\cr group variable name.
#' @param strata (`character` or `NA`)\cr deprecated, group variable name.
#' @param subject_var (`character` or `NA`)\cr subject variable name.
#' @param cohort_id (`character` or `NA`)\cr deprecated, subject variable name.
#' @param paramcd (`character` or `NA`)\cr `paramcd` variable name.
#' @param y_unit (`character` or `NA`)\cr `y_unit` variable name.
#'
Expand All @@ -493,15 +491,6 @@ h_format_row <- function(x, format, labels = NULL) {
control_lineplot_vars <- function(x = "AVISIT", y = "AVAL", group_var = "ARM", paramcd = "PARAMCD", y_unit = "AVALU",
subject_var = "USUBJID", strata = lifecycle::deprecated(),
cohort_id = lifecycle::deprecated()) {
checkmate::assert_string(x)
checkmate::assert_string(y)
checkmate::assert_string(group_var, na.ok = TRUE)
checkmate::assert_string(strata, na.ok = TRUE)
checkmate::assert_string(subject_var, na.ok = TRUE)
checkmate::assert_string(cohort_id, na.ok = TRUE)
checkmate::assert_string(paramcd, na.ok = TRUE)
checkmate::assert_string(y_unit, na.ok = TRUE)

if (lifecycle::is_present(strata)) {
lifecycle::deprecate_warn("0.9.2", "control_lineplot_vars(strata)", "control_lineplot_vars(group_var)")
group_var <- strata
Expand All @@ -512,6 +501,13 @@ control_lineplot_vars <- function(x = "AVISIT", y = "AVAL", group_var = "ARM", p
subject_id <- cohort_id
}

checkmate::assert_string(x)
checkmate::assert_string(y)
checkmate::assert_string(group_var, na.ok = TRUE)
checkmate::assert_string(subject_var, na.ok = TRUE)
checkmate::assert_string(paramcd, na.ok = TRUE)
checkmate::assert_string(y_unit, na.ok = TRUE)

variables <- c(x = x, y = y, group_var = group_var, paramcd = paramcd, y_unit = y_unit, subject_var = subject_var)
return(variables)
}
4 changes: 0 additions & 4 deletions man/control_lineplot_vars.Rd

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

0 comments on commit 00db6f8

Please sign in to comment.