Skip to content

Commit

Permalink
Merge pull request #203 from Merck/prepare-for-v0.1.3-release
Browse files Browse the repository at this point in the history
Prepare for v0.1.3 release
  • Loading branch information
LittleBeannie authored Oct 2, 2024
2 parents 2ba6994 + 9bc5616 commit 0b3a461
Show file tree
Hide file tree
Showing 16 changed files with 4,466 additions and 4,266 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: metalite.ae
Title: Adverse Events Analysis Using 'metalite'
Version: 0.1.2
Version: 0.1.3
Authors@R: c(
person("Yilong", "Zhang", role = c("aut")),
person("Yujie", "Zhao", email = "[email protected]", role = c("aut", "cre")),
Expand All @@ -14,6 +14,8 @@ Authors@R: c(
person("Xuan", "Deng", role = c("aut")),
person("Hiroaki", "Fukuda", role = c("aut")),
person("Bing", "Liu", role = c("aut")),
person("Jeetender", "Chauhan", role = c("aut")),
person("Li", "Ma", role = c("ctb")),
person("Merck Sharp & Dohme Corp", role = c("cph"))
)
Description: Analyzes adverse events in clinical trials using the 'metalite'
Expand Down
79 changes: 49 additions & 30 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,65 @@
# metalite.ae 0.1.3

## New features

- `format_ae_specific()` now has new arguments `filter_method` and `filter_criteria` to control displayed rows in a table, `sort_order` and `sort_column` to sort an output table, and `hide_soc_stats` to control display of statistics for SOC rows (#191, #192, #203).
- Add `data/metalite_ae_adesxum.rda` (#189).
- Add event counts to `avg_count()` and `extend_ae_specific_events()` (#194).
- Add `empty_table()` to return an empty table object when data has no population (#200).

## Bug fixes

- Fix bug to correctly display the order of means of duration and means of event count in `extend_ae_specific_events()` and `extend_ae_specific_duration()`(#194, #199).
- Fix bug to avoid an error when a treatment group has no observation to calculate event counts and duration in `avg_event()` and `avg_duration()` (#199).
- Fix bug to avoid an error when there is no observation to summarize event counts and duration in `avg_event()`, `avg_duration()`, `extend_ae_specific_events()` and `extend_ae_specific_duration()` (#200).

## Improvements

- Update `fmt_est()` to change display of missing values from a character string of "NA" to a blank in an output table (#194).
- Update `extend_ae_specific_inference()` to pass additional arguments to `rate_compare_sum()` (#197).

# metalite.ae 0.1.2

## New features

- `tlf_ae_summary()` now has a new argument `title` for a user-customized title (#133).
- Add new functions: `extend_ae_specific_subgroup()`, `prepare_ae_specific_subgroup()`, `format_ae_specific_subgroup()`, `tlf_ae_specific_subgroup()`, `extend_ae_summary_eaer()`,
`format_ae_exp_adj()` and `tlf_ae_exp_adj()` (#150, #161, #174, #180).
- Add `data/metalite_ae_adex.rda` (#164).
- Add new vignettes: `vignette("ae-specific-subgroup")` and `vignette("exposure-adjusted-event-rate")` (#167, #169).
- Add System Organ Classes (SOC) information to `outdata` in `prepare_ae_specific()` (#186).
- `tlf_ae_summary()` now has a new argument `title` for a user-customized title (#133).
- Add new functions: `extend_ae_specific_subgroup()`, `prepare_ae_specific_subgroup()`, `format_ae_specific_subgroup()`, `tlf_ae_specific_subgroup()`, `extend_ae_summary_eaer()`, `format_ae_exp_adj()` and `tlf_ae_exp_adj()` (#150, #161, #174, #180).
- Add `data/metalite_ae_adex.rda` (#164).
- Add new vignettes: `vignette("ae-specific-subgroup")` and `vignette("exposure-adjusted-event-rate")` (#167, #169).
- Add System Organ Classes (SOC) information to `outdata` in `prepare_ae_specific()` (#186).

## Bug fixes

- Fix bug to avoid warning messages when no comparison variables are requested in `format_ae_specific()` (#135).
- Fix bug to align the row order of output data with the input one in `avg_event()` and `avg_duration()` (#136).
- Fix bug to check missing grouping variable after a subset of input data in `prepare_ae_specific()` (#137).
- Fix bug to display item if AE term has `NA` in `prepare_ae_specific()` (#166).
- Fix bug to correctly assign treatment labels when a treatment variable has `NA` (#179).
- Fix bug to avoid warning messages when no comparison variables are requested in `format_ae_specific()` (#135).
- Fix bug to align the row order of output data with the input one in `avg_event()` and `avg_duration()` (#136).
- Fix bug to check missing grouping variable after a subset of input data in `prepare_ae_specific()` (#137).
- Fix bug to display item if AE term has `NA` in `prepare_ae_specific()` (#166).
- Fix bug to correctly assign treatment labels when a treatment variable has `NA` (#179).

## Improvements

- Update GitHub Actions workflow (#131, #163, #181).
- Add styler workflow (#134).
- Add CRAN download badge (#140).
- Remove dependencies on `dplyr` and `tidyr` from `avg_event()`, `avg_duration()` and `fmt_val()` (#136).
- Change the default value of the `title` argument in `tlf_ae_specific()` (#138).
- Remove `R/n_subject.R` and change to use `metalite::n_subject()` in `prepare_ae_specific()` (#144).
- Race values for adsl and adae are converted to title case in `meta_ae_exmple()` (#158).
- Organize files for utility functions (#159)
- Rename `R/rtf_output.R` to `R/utility.R`.
- Remove `rate_compare_sum.R`, `R/to_mock.R` and `R/to_sentence.R`.
- Move `to_rate_compare_sum()` to `R/rate_compare.R`, and move `to_mock()` and `to_sentence()` to `R/utility.R`.
- Remove library calls from tests (#183).
- Add `R/outdata.R` to control `outdata` object (#161).
- Add an installation section to `README.md` (#177).
- Improve style and formatting for vignettes and code (#158, #168).
- Update GitHub Actions workflow (#131, #163, #181).
- Add styler workflow (#134).
- Add CRAN download badge (#140).
- Remove dependencies on `dplyr` and `tidyr` from `avg_event()`, `avg_duration()` and `fmt_val()` (#136).
- Change the default value of the `title` argument in `tlf_ae_specific()` (#138).
- Remove `R/n_subject.R` and change to use `metalite::n_subject()` in `prepare_ae_specific()` (#144).
- Race values for adsl and adae are converted to title case in `meta_ae_exmple()` (#158).
- Organize files for utility functions (#159)
- Rename `R/rtf_output.R` to `R/utility.R`.
- Remove `rate_compare_sum.R`, `R/to_mock.R` and `R/to_sentence.R`.
- Move `to_rate_compare_sum()` to `R/rate_compare.R`, and move `to_mock()` and `to_sentence()` to `R/utility.R`.
- Remove library calls from tests (#183).
- Add `R/outdata.R` to control `outdata` object (#161).
- Add an installation section to `README.md` (#177).
- Improve style and formatting for vignettes and code (#158, #168).

# metalite.ae 0.1.1

- Updated the `DESCRIPTION` file to reformat the reference.
- Uncommented the previously commented code example.
- Updated the `DESCRIPTION` file to reformat the reference.
- Uncommented the previously commented code example.

# metalite.ae 0.1.0

- Initial submission to CRAN.
- Added a `NEWS.md` file to track changes to the package.
- Initial submission to CRAN.
- Added a `NEWS.md` file to track changes to the package.
7 changes: 7 additions & 0 deletions R/format_ae_specific.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#' Format AE specific analysis
#'
#' @inheritParams extend_ae_specific_inference
#' @param hide_soc_stats A boolean value to hide stats for SOC rows.
#' @param digits_prop A numeric value of number of digits for proportion value.
#' @param digits_ci A numeric value of number of digits for confidence interval.
#' @param digits_p A numeric value of number of digits for p-value.
Expand Down Expand Up @@ -84,6 +85,7 @@
#' head(tbl$tbl)
format_ae_specific <- function(outdata,
display = c("n", "prop", "total"),
hide_soc_stats = FALSE,
digits_prop = 1,
digits_ci = 1,
digits_p = 3,
Expand Down Expand Up @@ -333,6 +335,11 @@ format_ae_specific <- function(outdata,
}
}

# Control SOC stats
if (hide_soc_stats) {
res[outdata$order %% 1000 == 0, names(res)[!names(res) == "name"]] <- NA
}

# Transfer to Mock
if (mock) {
n_mock <- min(20, nrow(res), na.rm = TRUE)
Expand Down
3 changes: 3 additions & 0 deletions man/format_ae_specific.Rd

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

3 changes: 3 additions & 0 deletions man/format_ae_summary.Rd

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

2 changes: 2 additions & 0 deletions man/metalite.ae-package.Rd

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

4 changes: 2 additions & 2 deletions vignettes/ae-specific.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ tbl <- outdata |>
head(tbl$tbl)
```

We can use `extend_ae_specific_events()` to add average number of AE per subject.
We can use `extend_ae_specific_events()` to add number of AE and/or average of it per subject.

```{r}
tbl <- outdata |>
extend_ae_specific_events() |>
format_ae_specific(display = c("n", "prop", "events"))
format_ae_specific(display = c("n", "prop", "events_count", "events_avg"))
head(tbl$tbl)
```
Expand Down
Binary file modified vignettes/fig/ae0specific.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/pdf/ae0specific0sub0gender1.pdf
Binary file not shown.
Binary file modified vignettes/pdf/ae0specific1.pdf
Binary file not shown.
Binary file modified vignettes/pdf/ae0specific2.pdf
Binary file not shown.
Binary file modified vignettes/pdf/mock_ae0specific1.pdf
Binary file not shown.
Loading

0 comments on commit 0b3a461

Please sign in to comment.