Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu committed Nov 18, 2024
2 parents a884c6b + c685541 commit 1923d5a
Show file tree
Hide file tree
Showing 23 changed files with 752 additions and 17 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ renv.lock
^Meta$
.lintr
.github
^\.gitlab-ci\.yml$
tests/testthat/Rplots.pdf

# docs
Expand Down
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
include:
- project: 'nest/automation/gitlab-shared-library'
ref: main
file: R/R_NEST_min.gitlab-ci.yml
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: autoslider.core
Title: Slide Automation for Tables, Listings and Figures (TLGs)
Version: 0.0.1
Version: 0.1.0
Authors@R: c(
person("Joe", "Zhu", , "[email protected]", role = c("cre", "aut")),
person("Heng", "Wang", role = "aut"),
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
4 changes: 4 additions & 0 deletions NAMESPACE
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export(save_output.decoratedGrobSet)
export(save_output.dlisting)
export(save_outputs)
export(slides_preview)
export(t_ae_pt_diff_slide)
export(t_ae_pt_slide)
export(t_ae_pt_soc_diff_slide)
export(t_ae_pt_soc_slide)
export(t_ae_slide)
export(t_ae_summ_slide)
export(t_aesi_slide)
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# autoslider.core 0.0.1
# autoslider.core 0.1.0

### Miscellaneous
* First release.
9 changes: 4 additions & 5 deletions tmp/t_ae_pt_diff_slide.R → R/t_ae_pt_diff_slide.R
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @inherit gen_notes note
#' @export
#' @examples
#'
#' library(dplyr)
#' adsl <- eg_adsl %>%
#' dplyr::mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo")))
#' adae <- eg_adae %>%
Expand All @@ -20,7 +20,7 @@
#' )
#' out <- t_ae_pt_diff_slide(adsl, adae, "TRT01A", 2)
#' print(out)
#' generate_slides(out, "ae_diff.pptx")
#' generate_slides(out, paste0(tempdir(), "/ae_diff.pptx"))
t_ae_pt_diff_slide <- function(adsl, adae, arm = "TRT01A", cutoff = NA,
split_by_study = FALSE, side_by_side = NULL) {
cutoff <- check_and_set_cutoff(adae, cutoff)
Expand All @@ -32,7 +32,6 @@ t_ae_pt_diff_slide <- function(adsl, adae, arm = "TRT01A", cutoff = NA,

if (!all(dim(result@rowspans) == c(0, 0))) {
if (is.null(side_by_side)) {

# adding "N" attribute
arm <- col_paths(result)[[1]][1]

Expand Down Expand Up @@ -151,8 +150,8 @@ t_ae_pt_core <- function(adsl, adae, arm, cutoff, diff = FALSE, soc = "NULL",
myh_col_indices <- function(table_row, col_names) {
NULL
}
environment(myh_col_indices) <- asNamespace("tern")
assignInNamespace("h_col_indices", myh_col_indices, ns = "tern")
# environment(myh_col_indices) <- asNamespace("tern")
# assignInNamespace("h_col_indices", myh_col_indices, ns = "tern")
# result <- build_table(lyt = lyt, df = anl, alt_counts_df = adsl1)

result <- lyt_to_side_by_side_two_data(lyt, anl, adsl1, side_by_side)
Expand Down
4 changes: 2 additions & 2 deletions tmp/t_ae_pt_slide.R → R/t_ae_pt_slide.R
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#' @export
#' @examples
#'
#' library(dplyr)
#' # Example 1
#' adsl <- eg_adsl %>%
#' dplyr::mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo")))
Expand All @@ -27,7 +28,7 @@
#' # Example 2, prune by total column
#' out2 <- t_ae_pt_slide(adsl, adae, "TRT01A", 25, prune_by_total = TRUE)
#' print(out2)
#' generate_slides(out, "ae2.pptx")
#' generate_slides(out, paste0(tempdir(), "/ae2.pptx"))
t_ae_pt_slide <- function(adsl, adae, arm = "TRT01A", cutoff = NA, prune_by_total = FALSE,
split_by_study = FALSE,
side_by_side = NULL) {
Expand All @@ -41,7 +42,6 @@ t_ae_pt_slide <- function(adsl, adae, arm = "TRT01A", cutoff = NA, prune_by_tota
result@main_title <- "Adverse Events table"

if (is.null(side_by_side)) {

# adding "N" attribute
arm <- col_paths(result)[[1]][1]

Expand Down
5 changes: 2 additions & 3 deletions tmp/t_ae_pt_soc_diff_slide.R → R/t_ae_pt_soc_diff_slide.R
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @inherit gen_notes note
#' @export
#' @examples
#'
#' library(dplyr)
#' adsl <- eg_adsl %>%
#' dplyr::mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo")))
#' adae <- eg_adae %>%
Expand All @@ -20,7 +20,7 @@
#' )
#' out <- t_ae_pt_soc_diff_slide(adsl, adae, "TRT01A", 2)
#' print(out)
#' generate_slides(out, "ae_diff.pptx")
#' generate_slides(out, paste0(tempdir(), "/ae_diff.pptx"))
t_ae_pt_soc_diff_slide <- function(adsl, adae, arm = "TRT01A", cutoff = NA,
split_by_study = FALSE, side_by_side = NULL) {
cutoff <- check_and_set_cutoff(adae, cutoff)
Expand All @@ -32,7 +32,6 @@ t_ae_pt_soc_diff_slide <- function(adsl, adae, arm = "TRT01A", cutoff = NA,
result@main_title <- "Adverse Events with Difference"

if (is.null(side_by_side)) {

# adding "N" attribute
arm <- col_paths(result)[[1]][1]

Expand Down
5 changes: 2 additions & 3 deletions tmp/t_ae_pt_soc_slide.R → R/t_ae_pt_soc_slide.R
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#'
#' @export
#' @examples
#'
#' library(dplyr)
#' # Example 1
#' adsl <- eg_adsl %>%
#' dplyr::mutate(TRT01A = factor(TRT01A, levels = c("A: Drug X", "B: Placebo")))
Expand All @@ -28,7 +28,7 @@
#' # Example 2, prune by total column
#' out2 <- t_ae_pt_soc_slide(adsl, adae, "TRT01A", 25, prune_by_total = TRUE)
#' print(out2)
#' generate_slides(out2, "ae2.pptx")
#' generate_slides(out2, paste0(tempdir(), "/ae2.pptx"))
t_ae_pt_soc_slide <- function(adsl, adae, arm, cutoff = NA,
prune_by_total = FALSE,
split_by_study = FALSE,
Expand All @@ -42,7 +42,6 @@ t_ae_pt_soc_slide <- function(adsl, adae, arm, cutoff = NA,
result@main_title <- "Adverse Events table"

if (is.null(side_by_side)) {

# adding "N" attribute
arm <- col_paths(result)[[1]][1]

Expand Down
2 changes: 1 addition & 1 deletion R/t_dm_slide.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @inherit gen_notes note
#' @export
#' @examples
#'
#' library(dplyr)
#' adsl <- eg_adsl
#' out1 <- t_dm_slide(adsl, "TRT01P", c("SEX", "AGE", "RACE", "ETHNIC", "COUNTRY"))
#' print(out1)
Expand Down
Empty file modified autoslider.core.Rproj
100755 → 100644
Empty file.
51 changes: 51 additions & 0 deletions man/t_ae_pt_diff_slide.Rd

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

61 changes: 61 additions & 0 deletions man/t_ae_pt_slide.Rd

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

51 changes: 51 additions & 0 deletions man/t_ae_pt_soc_diff_slide.Rd

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

57 changes: 57 additions & 0 deletions man/t_ae_pt_soc_slide.Rd

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

2 changes: 1 addition & 1 deletion man/t_dm_slide.Rd

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

Loading

0 comments on commit 1923d5a

Please sign in to comment.