Skip to content

Commit

Permalink
Merge pull request #151 from sunroofgod/v2023.9.12
Browse files Browse the repository at this point in the history
v2023.9.12 as per CRAN
  • Loading branch information
sunroofgod authored Oct 19, 2023
2 parents 21ed407 + adac0b3 commit a4ddde6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
48 changes: 22 additions & 26 deletions R/002_df_for_plots.R
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
#' Helper functions that generate dfs for tuftelines plot
#'
#' @noRd
#'
#' Generates the dataframe requires for the tufte lines plot component in raw plots.
#'
#' This function returns a dataframe with summary statistics, such as mean, standard
#' deviation and quantiles (depending on the effect size) based on the input dataset.
#'
#' @param raw_data The tidy dataset passed to [load()] that was cleaned and altered for plotting.
#' @param enquo_x Quosure of x as initially passed to [load()].
#' @param enquo_y Quosure of y as initially passed to [load()].
#' @param proportional Boolean value as initially passed to [load()].
#' @param float_contrast Default TRUE. If TRUE, a Gardner-Altman plot will be produced.
#' If FALSE, a Cumming estimation plot will be produced.
#' @param enquo_id_col Quosure of id_col as initially passed to [load()].
#' @param idx The list of control-test groupings as initially passed to [load()].
#' @param tufte_lines_df Dataset for the creation of tufte lines.
#' @param proportional_data List of calculations related to the plotting of proportion plots.
#' @param scale_factor_sig Decimal value ranging from 0 to 1 which determines the significance of the scale factor.
#' @param bar_width Numeric value determining the width of the bar in the sankey diagram or proportion plots.
#' @param gap Numeric value determining the space between the bars in the sankey diagram or proportion plots.
#' @param sankey Boolean value determining if the flows between the bar charts will be plotted.
#' @param flow Boolean value determining whether the bars will be plotted in pairs.
#' @param N The number of rows in the proportional dataset.
#' @param proportion_success The proportion or ratio of values that are 1.
#' @param boots Boot result obtained from boot.ci
#' @param x_idx_position Numeric value determining the position of the plots on the x-axis.
#' @param gap Integer value specifying the amount of gap for each tufte line.
#' @param effsize_type String value specifying type of effect size.
#'
#' @details
#' Contains functions `df_for_tufte`, `create_dfs_for_sankey`, `create_dfs_for_xaxis_redraw`, `create_dfs_for_proportion_bar` for generation of dfs.
#'
#' @return
#' Various dfs which is required for the plotting functions to obtain a complete dabest plot.
#' @returns a dataframe for plotting of the tufte lines plot component.
#' @noRd
create_df_for_tufte <- function(raw_data, enquo_x, enquo_y, proportional, gap, effsize_type) {
tufte_lines_df <- raw_data %>%
dplyr::group_by(!!enquo_x) %>%
Expand Down Expand Up @@ -67,8 +52,19 @@ create_df_for_tufte <- function(raw_data, enquo_x, enquo_y, proportional, gap, e

return(tufte_lines_df)
}

# Function for creation of df for flow = FALSE plot
#' Generates df for tufte lines plot component for raw plot WITH flow = FALSE.
#'
#' This function rearranges and duplicates rows in a given dataframe (containing
#' summary statistics) in the order of the unlisted given list of vectors.
#'
#' @param idx List of vectors of control-test groupings that determines the arrangement
#' of the final dataframe output.
#' @param tufte_lines_df dataframe for plotting of the tufte lines plot component as
#' generated by [create_df_for_tufte()].
#' @param enquo_x Quosure of x as initially passed to [load()].
#'
#' @returns dataframe
#' @noRd
create_dfs_for_nonflow_tufte_lines <- function(idx,
tufte_lines_df,
enquo_x) {
Expand Down
7 changes: 6 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Resubmission
This is a resubmission. In this version I have:

* Contacted the maintainers of affected package(s) >= 2 weeks ago.

## R CMD check results

0 errors | 0 warnings | 3 note
Expand Down Expand Up @@ -42,4 +47,4 @@ Issues with CRAN packages are summarised below.

* permubiome (NA)

Maintainers of affected package(s) above have been informed for >= 2 weeks. No further changes to be made.
Maintainers of affected package(s) above have been informed for >= 2 weeks ago. No further changes to be made.

0 comments on commit a4ddde6

Please sign in to comment.