Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework docs summarize_glm_count #1269

Merged
merged 15 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export(h_or_cat_interaction)
export(h_or_cont_interaction)
export(h_or_interaction)
export(h_pkparam_sort)
export(h_ppmeans)
export(h_proportion_df)
export(h_proportion_subgroups_df)
export(h_row_counts)
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# tern 0.9.5.9006
### Enhancements
* Added `errorbar_width` and `linetype` parameters to `g_lineplot`.
* Reworking of `summarize_glm_count()` documentation and all its associated functions to better describe the results and the functions' purpose.

### Bug Fixes
* Fixed a bug in `a_surv_time` that threw an error when split only has `"is_event"`.
* Added defaults for `d_count_cumulative` parameters as described in the documentation.
* Empty levels on `g_lineplot` x-axis are not shown in either plots.
* Fixed disappearing line in `g_lineplot` when using only one group or strata level.
* Fixed defaults for formats and labels in `get_formats_from_stats` and `get_labels_from_stats`.
* Fixed bug for linear scaling factor (`scale` parameter) being applied to response but not to rate in `h_glm_count` while all distributions have logarithmic link function.

### Miscellaneous
* Began deprecation of the confusing functions `summary_formats` and `summary_labels`.

# tern 0.9.5

Expand Down
12 changes: 9 additions & 3 deletions R/g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@
subtitle_add_paramcd = TRUE,
subtitle_add_unit = TRUE,
caption = NULL,
table_format = get_formats_from_stats(table),
table_labels = get_labels_from_stats(table),
table_format = NULL,
table_labels = NULL,
table_font_size = 3,
errorbar_width = 0.45,
newpage = lifecycle::deprecated(),
Expand All @@ -176,8 +176,14 @@
checkmate::assert_string(title, null.ok = TRUE)
checkmate::assert_string(subtitle, null.ok = TRUE)

if (!is.null(table)) {
table_format <- get_formats_from_stats(table)
table_labels <- get_labels_from_stats(table)
}

extra_args <- list(...)
if ("control" %in% names(extra_args) && all(table_labels == get_labels_from_stats(table))) {
if ("control" %in% names(extra_args) &&
(!is.null(table) && all(table_labels == get_labels_from_stats(table)))) {

Check warning on line 186 in R/g_lineplot.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/g_lineplot.R,line=186,col=4,[indentation_linter] Indentation should be 8 spaces but is 4 spaces.
table_labels <- table_labels %>% labels_use_control(extra_args[["control"]])
}

Expand Down
Loading
Loading