Skip to content

Commit

Permalink
initial support for ggcontinuousexpdist
Browse files Browse the repository at this point in the history
  • Loading branch information
certara-smouksassi committed Jan 5, 2024
1 parent 0957f95 commit 1c72272
Show file tree
Hide file tree
Showing 6 changed files with 661 additions and 41 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export(geom_km)
export(geom_kmband)
export(geom_kmticks)
export(get_source_code)
export(ggcontinuousexpdist)
export(ggkmrisktable)
export(gglogisticexpdist)
export(merge_steps)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* added support of pasting values of two/three variables
* added function `ggkmrisktable` to add facettable risk tables, km and split exposures to ntiles
* added function `gglogisticexpdist`
* added function `ggcontinuousexpdist`
* TBD reduce package size !

# ggquickeda 0.3.0
Expand Down
483 changes: 483 additions & 0 deletions R/ggcontinuousexpdist.R

Large diffs are not rendered by default.

70 changes: 30 additions & 40 deletions R/gglogisticexpdist.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,36 @@ plogis <- function(x) exp(x)/(1+exp(x))
#' exposure_metric_plac_value = 0,
#' dist_position_scaler = 0.15)+
#' facet_grid(Endpoint~expname+exptile,scales="free",
#' margins = "exptile")
#' margins = "exptile")
#' #Example 6
#' a <- gglogisticexpdist(data = effICGI, #
#' response = "response",
#' endpoint = "Endpoint",
#' DOSE = "DOSE",yproj_dodge = 36,
#' exposure_metrics = c("AUC"),
#' exposure_metric_split = c("quartile"),
#' exposure_distribution ="lineranges",
#' exposure_metric_soc_value = -99,
#' exposure_metric_plac_value = 0) +
#' facet_grid(Endpoint~expname,switch = "both")
#' b <- gglogisticexpdist(data = effICGI, #
#' response = "response",
#' endpoint = "Endpoint",
#' DOSE = "DOSE",yproj_dodge = 2,
#' exposure_metrics = c("CMAX"),
#' exposure_metric_split = c("quartile"),
#' exposure_distribution ="lineranges",
#' exposure_metric_soc_value = -99,
#' exposure_metric_plac_value = 0,
#' yaxis_position = "right")+
#' facet_grid(Endpoint~expname,switch = "x")+
#' theme(strip.text.y.right = element_blank(),
#' strip.background.y = element_blank())
#' library(patchwork)
#' (a | b ) +
#' plot_layout(guides = "collect")&
#' theme(legend.position = "top")
#'
#'}
#' @export
gglogisticexpdist <- function(data = effICGI,
Expand Down Expand Up @@ -517,42 +546,3 @@ gglogisticexpdist <- function(data = effICGI,

}

# library(ggquickeda)
# effICGI <- logistic_data |>
# dplyr::filter(!is.na(ICGI))|>
# dplyr::filter(!is.na(AUC))
# effICGI$DOSE <- factor(effICGI$DOSE,
# levels=c("0", "600", "1200","1800","2400"),
# labels=c("Placebo", "600 mg", "1200 mg","1800 mg","2400 mg"))
# effICGI$STUDY <- factor(effICGI$STUDY)
# effICGI$ICGI2 <- effICGI$ICGI
# effICGI <- tidyr::gather(effICGI,Endpoint,response,ICGI,ICGI2)
#
#
# a <- gglogisticexpdist(data = effICGI, # long format filter to Endpoint of choice
# response = "response",
# endpoint = "Endpoint",
# DOSE = "DOSE",yproj_dodge = 36,
# exposure_metrics = c("AUC"),
# exposure_metric_split = c("quartile"),
# exposure_distribution ="lineranges",
# exposure_metric_soc_value = -99,
# exposure_metric_plac_value = 0) +
# facet_grid(Endpoint~expname,switch = "both")
# b <- gglogisticexpdist(data = effICGI, # long format filter to Endpoint of choice
# response = "response",
# endpoint = "Endpoint",
# DOSE = "DOSE",yproj_dodge = 2,
# exposure_metrics = c("CMAX"),
# exposure_metric_split = c("quartile"),
# exposure_distribution ="lineranges",
# exposure_metric_soc_value = -99,
# exposure_metric_plac_value = 0,
# yaxis_position = "right")+
# facet_grid(Endpoint~expname,switch = "x")+
# theme(strip.text.y.right = element_blank(),
# strip.background.y = element_blank())
# library(patchwork)
# (a | b ) +
# plot_layout(guides = "collect")&
# theme(legend.position = "top")
116 changes: 116 additions & 0 deletions man/ggcontinuousexpdist.Rd

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

31 changes: 30 additions & 1 deletion man/gglogisticexpdist.Rd

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

0 comments on commit 1c72272

Please sign in to comment.