From 2658ad2c40cf04a322fcdc86aa33a8d62edd9f49 Mon Sep 17 00:00:00 2001 From: Dan Chaltiel Date: Wed, 22 May 2024 15:50:25 +0200 Subject: [PATCH] doc --- NAMESPACE | 6 ++---- R/ae_table_grade.R | 4 ++-- man/ae_plot_grade_max.Rd | 4 +++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index f02430a..b419e94 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -79,9 +79,9 @@ importFrom(dplyr,mutate) importFrom(dplyr,n) importFrom(dplyr,na_if) importFrom(dplyr,pull) +importFrom(dplyr,recode) importFrom(dplyr,relocate) importFrom(dplyr,rename) -importFrom(dplyr,rename_all) importFrom(dplyr,rename_with) importFrom(dplyr,rowwise) importFrom(dplyr,select) @@ -107,6 +107,7 @@ importFrom(ggplot2,geom_point) importFrom(ggplot2,geom_text) importFrom(ggplot2,ggplot) importFrom(ggplot2,labs) +importFrom(ggplot2,position_dodge) importFrom(ggplot2,scale_fill_manual) importFrom(ggplot2,scale_fill_steps) importFrom(ggplot2,scale_x_continuous) @@ -118,7 +119,6 @@ importFrom(ggplot2,unit) importFrom(ggplot2,vars) importFrom(ggplot2,waiver) importFrom(glue,glue) -importFrom(haven,read_sas) importFrom(haven,read_xpt) importFrom(labelled,var_label) importFrom(lifecycle,deprecate_warn) @@ -155,7 +155,6 @@ importFrom(rlang,check_installed) importFrom(rlang,current_env) importFrom(rlang,enquo) importFrom(rlang,ensym) -importFrom(rlang,global_env) importFrom(rlang,have_name) importFrom(rlang,int) importFrom(rlang,is_empty) @@ -203,4 +202,3 @@ importFrom(tidyselect,matches) importFrom(tidyselect,where) importFrom(utils,head) importFrom(utils,object.size) -importFrom(utils,read.csv) diff --git a/R/ae_table_grade.R b/R/ae_table_grade.R index f5a314c..7e44c0e 100644 --- a/R/ae_table_grade.R +++ b/R/ae_table_grade.R @@ -13,7 +13,7 @@ #' #' @return a crosstable (dataframe) #' @export -#' @importFrom dplyr arrange full_join mutate rename_with select summarise +#' @importFrom dplyr arrange full_join mutate recode rename_with select summarise #' #' @examples #' @@ -71,7 +71,7 @@ ae_table_grade_max = function( #' #' @return a patchwork of ggplots #' @importFrom dplyr arrange full_join mutate rename_with select summarise -#' @importFrom ggplot2 aes geom_bar ggplot labs scale_x_continuous scale_y_discrete theme waiver +#' @importFrom ggplot2 aes geom_bar ggplot labs position_dodge scale_x_continuous scale_y_discrete theme waiver #' @importFrom purrr map #' @importFrom rlang set_names #' @export diff --git a/man/ae_plot_grade_max.Rd b/man/ae_plot_grade_max.Rd index 571a1da..f076acc 100644 --- a/man/ae_plot_grade_max.Rd +++ b/man/ae_plot_grade_max.Rd @@ -9,6 +9,7 @@ ae_plot_grade_max( ..., df_enrol, type = c("stack", "dodge", "fill"), + proportion = TRUE, drop_levels = FALSE, arm = "ARM", subjid = "SUBJID", @@ -43,7 +44,8 @@ Produces a graphic representation of AE, counting the maximum grade each patient } \examples{ tm = edc_example_ae() -ae_plot_grade_max(df_ae=tm$ae, df_enrol=tm$enrolres, type=c("dodge", "fill")) +ae_plot_grade_max(df_ae=tm$ae, df_enrol=tm$enrolres) +ae_plot_grade_max(df_ae=tm$ae, df_enrol=tm$enrolres, type=c("dodge", "fill"), proportion=FALSE) ae_plot_grade_max(df_ae=tm$ae, df_enrol=tm$enrolres, arm=NULL) + ggplot2::coord_flip() #you can use modificators from the patchwork package, like "&"