Skip to content

Commit

Permalink
Merge branch '666-implement-the-dataordinal-class' of github.com:Roch…
Browse files Browse the repository at this point in the history
…e/crmPack into 666-implement-the-dataordinal-class
  • Loading branch information
Puzzled-Face committed Sep 11, 2023
2 parents d928a8c + f411156 commit aa69ee0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion R/Data-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ DataDA <- function(u = numeric(),
#' @param yCategories (named `integer`)\cr the names and codes for the
#' toxicity categories used in the data. Category labels are taken from the
#' names of the vector. The names of the vector must be unique and its values
#' must be sorted and take the values 0, 1, 2, ...'
#' must be sorted and take the values 0, 1, 2, ...
#' @inheritParams Data
#' @inherit Data details note params
#' @example examples/Data-class-DataOrdinal.R
Expand Down
28 changes: 16 additions & 12 deletions R/Data-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ setMethod(
#' as the active dose level in the corresponding cohort,
#' and DLTs are always assigned to the first subjects in a cohort.
#' @param legend (`flag`)\cr whether the legend should be added.
#' @param tox_labels (`named list of character`)\cr The labels of the toxicity
#' categories
#' @param tox_shapes (`names list of integers`)\cr The symbols used to identify
#' the toxicity categories
#' @param tox_labels (`named list of character`)\cr the labels of the toxicity
#' categories.
#' @param tox_shapes (`names list of integers`)\cr the symbols used to identify
#' the toxicity categories.
#' @param ... not used.
#'
#' @note With more than 9 toxicity categories, toxicity symbols must be
Expand Down Expand Up @@ -277,7 +277,12 @@ setMethod(
#' @param new_cohort (`flag`)\cr if `TRUE` (default) the new data are assigned
#' to a new cohort.
#' @param check (`flag`)\cr whether the validation of the updated object should
#' be conducted. Current implementation of this `update` method allows for
#' be conducted. See details below.
#' @param ... not used.
#'
#' @return The new, updated [`Data`] object.
#'
#' @details The current implementation of this `update` method allows for
#' updating the `Data` class object by adding a single dose level `x` only.
#' However, there might be some use cases where the new cohort to be added
#' contains a placebo and active dose. Hence, such update would need to be
Expand All @@ -287,9 +292,6 @@ setMethod(
#' the `update` method would normally throw the error when attempting to add
#' a placebo in the first call. To allow for such updates, the `check`
#' parameter should be then set to `FALSE` for that first call.
#' @param ... not used.
#'
#' @return The new, updated [`Data`] object.
#'
#' @aliases update-Data
#' @export
Expand Down Expand Up @@ -366,7 +368,12 @@ setMethod(
#' @param new_cohort (`flag`)\cr if `TRUE` (default) the new data are assigned
#' to a new cohort.
#' @param check (`flag`)\cr whether the validation of the updated object should
#' be conducted. Current implementation of this `update` method allows for
#' be conducted. See Details below.
#' @param ... not used.
#'
#' @return The new, updated [`DataOrdinal`] object.
#'
#' @details The current implementation of this `update` method allows for
#' updating the `DataOrdinal` class object by adding a single dose level `x` only.
#' However, there might be some use cases where the new cohort to be added
#' contains a placebo and active dose. Hence, such update would need to be
Expand All @@ -376,9 +383,6 @@ setMethod(
#' the `update` method would normally throw the error when attempting to add
#' a placebo in the first call. To allow for such updates, the `check`
#' parameter should be then set to `FALSE` for that first call.
#' @param ... not used.
#'
#' @return The new, updated [`DataOrdinal`] object.
#'
#' @aliases update-DataOrdinal
#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/helpers_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ setGeneric(
#' It can be e.g. an extra `column_name = value` pair based on a slot
#' from `x` (which in this case might be a subclass of `Data`)
#' which does not appear in `Data`.
#' @return A [`data.frame`] object with columns patient, ID, cohort, dose and
#' @return A `data.frame` object with columns patient, ID, cohort, dose and
#' toxicity.
#' @describeIn h_plot_data_df Class specific method for [`Data`]
#' @describeIn h_plot_data_df method for [`Data`].
setMethod(
f = "h_plot_data_df",
signature = signature(data = "Data"),
Expand Down

0 comments on commit aa69ee0

Please sign in to comment.