Skip to content

Commit

Permalink
Update NEWS, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
edelarua committed Nov 1, 2023
1 parent 80f2045 commit f98d6e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
9 changes: 7 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
* Added `ref_group_position` function to place the reference group facet last, first or at a certain position.
* Added `keep_level_order` split function to retain original order of levels in a split.
* Added `level_order` split function to reorder manually the levels.
* Added function `get_indents_from_stats` to format and return indent modifiers for a given set of statistics.
* Added summarize function version of `count_occurrences` analyze function, `summarize_occurrences`.
* Added referential footnotes to `surv_time` for censored range observations.

### Enhancements
* Updated `get_formats_from_stats` and `get_labels_from_stats` with added `method` parameter to retrieve method-specific defaults.
* Updated `get_labels_from_stats` with added `control` parameter to auto-adjust default labels based on statistic control parameters.

### Miscellaneous
* Specified minimal version of package dependencies.
Expand All @@ -12,8 +19,6 @@

### New Features
* Added the `na_str` argument to `analyze` & `summarize_row_groups` wrapper functions `count_abnormal`, `count_abnormal_by_baseline`, `count_abnormal_by_marked`, `count_abnormal_by_worst_grade`, `count_abnormal_lab_worsen_by_baseline`, `count_cumulative`, `count_missed_doses`, `count_occurrences`, `count_occurrences_by_grade`, `summarize_occurrences_by_grade`, `summarize_patients_events_in_cols`, `count_patients_with_event`, `count_patients_with_flags`, `count_values`, `estimate_multinomial_response`, `estimate_proportion`, `h_tab_one_biomarker`, `estimate_incidence_rate`, `logistic_summary_by_flag`, `estimate_odds_ratio`, `estimate_proportion_diff`, `test_proportion_diff`, `summarize_ancova`, `summarize_change`, `summarize_glm_count`, `summarize_num_patients`, `analyze_num_patients`, `summarize_patients_exposure_in_cols`, `coxph_pairwise`, `tabulate_survival_subgroups`, `surv_time`, and `surv_timepoint`.
* Added function `get_indents_from_stats` to format and return indent modifiers for a given set of statistics.
* Added summarize function version of `count_occurrences` analyze function, `summarize_occurrences`.

### Enhancements
* Added formatting function `format_count_fraction_lt10` for formatting `count_fraction` with special consideration when count is less than 10.
Expand Down
9 changes: 9 additions & 0 deletions R/utils_default_stats_formats_labels.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ get_stats <- function(method_groups = "analyze_vars_numeric", stats_in = NULL, a
#'
#' @param formats_in (named `vector`) \cr inserted formats to replace defaults. It can be a
#' character vector from [formatters::list_valid_format_labels()] or a custom format function.
#' @param method (`character`) name of statistical method group from which to draw alternative
#' default formats from. E.g. For `method = "surv_time"`, the default format for `range` is
#' `"xx.x to xx.x"` instead of the tern default, `"xx.x - xx.x"`.
#'
#' @return
#' * `get_formats_from_stats()` returns a named list of formats, they being a value from
Expand Down Expand Up @@ -202,6 +205,12 @@ get_formats_from_stats <- function(stats, formats_in = NULL, method = NULL) {
#' variable levels will be used as the defaults, and the names of the given custom values should
#' correspond to levels (or have format `statistic.level`) instead of statistics. Can also be
#' variable names if rows correspond to different variables instead of levels. Defaults to `NULL`.
#' @param method (`character`) name of statistical method group from which to draw alternative
#' default formats from. E.g. For `method = "surv_time"`, the default label for `range` is
#' `"Range"` instead of the tern default, `"Min - Max"`.
#' @param control (named `list`) list of control parameters to apply to automatically adjust
#' default labels. E.g. If control has element `conf_level` set to `0.9`, the default label for
#' statistic `mean_ci` will become `"Mean 90% CI"`.
#'
#' @return
#' * `get_labels_from_stats()` returns a named character vector of default labels (if present
Expand Down
8 changes: 8 additions & 0 deletions man/default_stats_formats_labels.Rd

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

0 comments on commit f98d6e3

Please sign in to comment.