Skip to content

Commit

Permalink
Merge pull request #127 from Merck/126-release-metaliteae-011
Browse files Browse the repository at this point in the history
address cran comments
  • Loading branch information
nanxstats authored Feb 23, 2023
2 parents f226ec8 + c9a4c89 commit a1c7072
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 27 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@
^metalite.ae\.Rcheck$
^metalite.ae.*\.tar\.gz$
^metalite.ae.*\.tgz$
^cran-comments\.md$
4 changes: 2 additions & 2 deletions 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.0
Version: 0.1.1
Authors@R: c(
person("Yilong", "Zhang", role = c("aut")),
person("Yujie", "Zhao", email = "[email protected]", role = c("aut", "cre")),
Expand All @@ -19,7 +19,7 @@ Description: Analyzes adverse events in clinical trials using the 'metalite'
production-ready tables, listings, and figures discussed in the
adverse events analysis chapters of
"R for Clinical Study Reports and Submission"
(Zhang et al., 2022, <https://r4csr.org/>).
by Zhang et al. (2022) <https://r4csr.org/>.
License: GPL-3
URL: https://merck.github.io/metalite.ae/, https://github.com/Merck/metalite.ae
BugReports: https://github.com/Merck/metalite.ae/issues
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# metalite.ae 0.1.1

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

# metalite.ae 0.1.0

- Initial submission to CRAN.
Expand Down
2 changes: 1 addition & 1 deletion R/meta_ae_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ meta_ae_example <- function() {
)

# Assign label
adae <- assign_label(adae,
adae <- metalite::assign_label(adae,
var = c("related", "outcome", "duration", "AESEV", "AESER", "AEDECOD", "action_taken"),
label = c("Related", "Outcome", "Duration", "Intensity", "Serious", "Adverse Event", "Action Taken")
)
Expand Down
11 changes: 5 additions & 6 deletions R/n_subject.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ n_subject <- function(id, group, par = NULL, use_na = c("ifany", "no", "always")
#' @noRd
#'
#' @examples
#' # library(r2rtf)
#' #
#' # r2rtf_adae$TRTA <- factor(r2rtf_adae$TRTA)
#' #
#' # metalite.ae:::avg_event(r2rtf_adae$USUBJID, r2rtf_adae$TRTA)
#' # metalite.ae:::avg_event(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$AEDECOD)
#' library(r2rtf)
#'
#' r2rtf_adae$TRTA <- factor(r2rtf_adae$TRTA)
#' metalite.ae:::avg_event(r2rtf_adae$USUBJID, r2rtf_adae$TRTA)
#' metalite.ae:::avg_event(r2rtf_adae$USUBJID, r2rtf_adae$TRTA, r2rtf_adae$AEDECOD)
avg_event <- function(id, group, par = NULL) {
if ("factor" %in% class(group)) {
u_group <- as.character(levels(group))
Expand Down
20 changes: 11 additions & 9 deletions R/prepare_ae_specific_subgroup.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@
#' @export
#'
#' @examples
#' # meta <- meta_ae_example()
#' # prepare_ae_specific_subgroup(
#' # meta,
#' # population = "apat",
#' # observation = "wk12",
#' # parameter = "rel",
#' # subgroup_var = "RACE"
#' # )$data
#' meta <- meta_ae_example()
#'
#' prepare_ae_specific_subgroup(
#' meta,
#' population = "apat",
#' observation = "wk12",
#' parameter = "rel",
#' subgroup_var = "RACE"
#' )
prepare_ae_specific_subgroup <- function(meta,
population,
observation,
Expand All @@ -47,7 +48,8 @@ prepare_ae_specific_subgroup <- function(meta,
components = c("soc", "par"),
display_total = TRUE,
display_subgroup_total = TRUE) {
stop("This function is still under development.", call. = FALSE)
message("This function is still under development.")
return(invisible(NULL))

if (!subgroup_header %in% c(1, 2)) {
stop("`subgroup_header` can only have value 1 or 2.", call. = FALSE)
Expand Down
6 changes: 6 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Resubmission

This is a resubmission. In this version, I have fixed the issues identified in v0.1.0:

* Uncommented the previously commented code example in `prepare_ae_specific_subgroup.Rd`.
* Updated DESCRIPTION to format the reference as authors (year) <https:...>.
2 changes: 1 addition & 1 deletion man/metalite.ae-package.Rd

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

17 changes: 9 additions & 8 deletions man/prepare_ae_specific_subgroup.Rd

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

0 comments on commit a1c7072

Please sign in to comment.