Skip to content

Commit

Permalink
reduce package size, example run itmes to make cran happy
Browse files Browse the repository at this point in the history
  • Loading branch information
certara-smouksassi committed Jan 14, 2024
1 parent 79486ef commit cc34567
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 36 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,13 @@ Imports:
ggridges,
rms,
tibble,
patchwork
patchwork (>= 1.2.0)
Suggests:
knitr,
rmarkdown
License: MIT + file LICENSE
SystemRequirements: pandoc with https support
LazyData: true
VignetteBuilder: knitr
RoxygenNote: 7.2.3
RoxygenNote: 7.3.0
Encoding: UTF-8

2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export(stat_kmticks)
import(tidyr)
importFrom(ggbeeswarm,position_beeswarm)
importFrom(ggbeeswarm,position_quasirandom)
importFrom(rlang,)
importFrom(rlang,.data)
importFrom(rlang,`:=`)
importFrom(rlang,sym)
importFrom(scales,identity_trans)
importFrom(scales,label_parse)
Expand Down
15 changes: 7 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# ggquickeda 0.3.1
* rebuilt docs fixed broken link
* fixing some regressions introduced by bookmarking
* fixing some errors by the new R rules for logical comparison ||
* fixing error in aspect.ratio not numeric
* fixing other regression with ggpairs color and group
* 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 !
* fixing some errors by the new R rules for logical comparison length with `|` versus `||`
* fixing error in aspect.ratio not numeric (was also fixed in ggplot2)
* fixing other regressions with ggpairs color and group
* added support of pasting values of two/three variables where it was just a placeholder
* added function `ggkmrisktable` to add facetable risk tables, km and by ntiles split exposures
* added function `gglogisticexpdist` and `ggcontinuousexpdist` to add facetable logistic/linear regression with exposures split to ntiles with exposure distributions by dose/group and optional y axis projections
* added link to github pages in description thanks to @olivroy

# ggquickeda 0.3.0
* added options to drop levels for user discrete shape and linetype scales
Expand Down
9 changes: 5 additions & 4 deletions R/ggcontinuousexpdist.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ plogis <- function(x) exp(x)/(1+exp(x))
#' yproj_dodge = 20 ,
#' exposure_distribution ="distributions")
#' a / b +
#'plot_layout(guides = "collect") &
#' plot_layout(guides = "collect") &
#' theme(legend.position = "top")
#' #Example 2
#' effICGI$SEX <- as.factor(effICGI$SEX)
#' ggcontinuousexpdist(data = effICGI |>
#'
#' #Example 2
#' effICGI$SEX <- as.factor(effICGI$SEX)
#' ggcontinuousexpdist(data = effICGI |>
#' dplyr::filter(Endpoint =="ICGI7"),
#' response = "response",
#' endpoint = "Endpoint",
Expand Down
16 changes: 10 additions & 6 deletions R/gglogisticexpdist.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,15 @@ plogis <- function(x) exp(x)/(1+exp(x))
#' dist_position_scaler = 0.15)+
#' facet_grid2(Endpoint~expname+DOSE2,scales="free",
#' margins = "DOSE2",strip = strip_nested())
#' # Example 4
#'gglogisticexpdist(data = effICGI,
#'\dontrun{
#' # Example 4
#' effICGI$SEX <- as.factor(effICGI$SEX)
#' gglogisticexpdist(data = effICGI |>
#' dplyr::filter(Endpoint=="ICGI"),
#' response = "response",
#' endpoint = "Endpoint",
#' DOSE = "DOSE",
#' color_fill = "SEX",
#' exposure_metrics = c("AUC"),
#' exposure_metric_split = c("quartile"),
#' exposure_distribution ="distributions",
Expand All @@ -119,15 +123,15 @@ plogis <- function(x) exp(x)/(1+exp(x))
#' lineranges_ypos = -0.2,
#' yproj_xpos = -10,
#' yproj_dodge = 20,
#' prob_text_size = 9,
#' prob_text_size = 6,
#' binlimits_text_size = 6,
#' N_text_size = 5,
#' N_text_size = 4,
#' dist_position_scaler = 0.15)+
#' ggplot2::scale_x_continuous(breaks = seq(0,350,50),
#' expand = ggplot2::expansion(add= c(0,0),mult=c(0,0)))+
#' ggplot2::coord_cartesian(xlim = c(-30,355))+
#' ggplot2::facet_grid(~Endpoint)
#'\dontrun{
#' ggplot2::facet_grid(Endpoint~expname+color_fill2, margins ="color_fill2" )
#'
#' #Example 4b
#' effICGI$SEX <- as.factor(effICGI$SEX)
#' gglogisticexpdist(data = effICGI |>
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ It enables you to quickly explore your data and to detect trends on the fly. You

It also has the `km`, `kmband` and `kmticks` geoms/stats to facilitate the plotting of **Kaplan-Meier** Survival curves.

For a quick overview using an older version of the app head to this <a href="https://www.youtube.com/watch?v=1rBBmJUIZhs" target="_blank"> Youtube Tutorial </a>.
For a quick overview using an older version of the app head to this <a href="https://www.youtube.com/watch?v=1rBBmJUIZhs" target="_blank"> Youtube Tutorial </a>. A more recent video tutorial can be found here:
<a href="https://certara.github.io/R-Certara/articles/lesson_3.html" target="_blank">Certara R School Introduction to ggquickeda </a>.


### Installation and Running information
```
Expand Down Expand Up @@ -50,9 +52,6 @@ The package has also the following vignettes:
2. <a href="https://cran.r-project.org/package=ggquickeda/vignettes/AdditionalPlotsStats.html" target="_blank"> Additional Plots and Stats with ggquickeda </a>.
3. <a href="https://cran.r-project.org/package=ggquickeda/vignettes/Visualizing_Summary_Data.html" target="_blank"> Visualizing Summary Data with ggquickeda </a>.

### Plot Example
![Example use case 1 with the included sample_df](vignettes/img/snapshot1.gif)

### Table Example
![Example Descriptive Stats](vignettes/img/snapshot3.1.png)

Expand Down
19 changes: 9 additions & 10 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
## Test environments
* local Windows 10 install, R 4.2.2
* local Windows 10 install, R 4.3.2
* github actions windows-latest (release)
* github actions macOS-latest (release)
* github actions ubuntu-20.04 (release)
* github actions ubuntu-20.04 (devel)
* github actions ubuntu-latest (devel, release and oldrel-1)
* win-builder (devel and release)


## R CMD check results

0 errors | 0 warnings | 2 notes
0 errors | 0 warnings | 3 notes

* This is a significant update fixing several bugs and adding three plotting functions.
* Notes about unused declared imports from the previous/current builds are false positives since these are used in the shiny app code and are required for it to work properly.
* Notes about depending on many packages appear and is a choice and a risk I am willing to take, as this package requires all of them to work properly.
* Notes on examples taking > 5s is necessary since ggplot2 rendering of complex plots is long
* The package size is now below 5MB after removing heavy gifs from the readme.

* The package size is now 4917 kb after compressing the vignette pngs even more.l
* This is a small update adding user experience improvement for the user to be able to save the state of the shiny app.
* some Notes about unused dependencies from the previous builds on some platforms are false positives since these are used in the shiny app code and are required for it.
* Note about depending on many packages appear and is a choice and a risk I am willing to take, as this package requires all of them to work properly.
* An attempt to reduce the size of the package was made by further reducing the readme/vignettes' pngs.

## Reverse dependencies

Expand Down
Binary file removed vignettes/img/snapshot1.gif
Binary file not shown.

0 comments on commit cc34567

Please sign in to comment.