diff --git a/R/002_df_for_plots.R b/R/002_df_for_plots.R index 42a41c3..0148dda 100644 --- a/R/002_df_for_plots.R +++ b/R/002_df_for_plots.R @@ -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) %>% @@ -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) { diff --git a/cran-comments.md b/cran-comments.md index e89121d..9eba1a7 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -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 @@ -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. \ No newline at end of file +Maintainers of affected package(s) above have been informed for >= 2 weeks ago. No further changes to be made. \ No newline at end of file