@@ -80,7 +80,29 @@ create_dfs_for_nonflow_tufte_lines <- function(idx,
8080 return (new_tufte_lines_df )
8181}
8282
83- # Function for creation of df for sankey plot
83+ # ' Generates df for sankey plot component for raw plot WITH flow = TRUE
84+ # '
85+ # ' This function generates data frames necessary for generating
86+ # ' sankey diagrams for visualizing flows and proportions of categorical data.
87+ # '
88+ # '
89+ # ' @param float_contrast Boolean value determining if a Gardner-Altman plot or Cumming estimation plot will be produced.
90+ # ' @param raw_data The tidy dataset passed to [load()] that was cleaned and altered for plotting.
91+ # ' @param proportional_data List of calculations related to the plotting of proportion plots.
92+ # ' @param enquo_x Quosure of x as initially passed to [load()].
93+ # ' @param enquo_y Quosure of y as initially passed to [load()].
94+ # ' @param enquo_id_col Quosure of id_col as initially passed to [load()].
95+ # ' @param idx List of vectors of control-test groupings that determines the arrangement
96+ # ' of the final dataframe output.
97+ # ' @param scale_factor_sig Numeric value determining the significance of the scale factor.
98+ # ' @param bar_width Numeric value determining the width of the bar in the sankey diagram.
99+ # ' @param gap Integer value specifying the amount of gap for each tufte line.
100+ # ' @param sankey Boolean value determining if the flows between the bar charts will be plotted.
101+ # ' @param flow Boolean value determining whether the bars will be plotted in pairs.
102+ # ' @param N Total number of observations or data points in the dataset.
103+ # '
104+ # ' @returns dataframe
105+ # ' @noRd
84106create_dfs_for_sankey <- function (
85107 float_contrast = FALSE ,
86108 raw_data ,
@@ -326,7 +348,17 @@ create_dfs_for_sankey <- function(
326348 return (dfs_for_sankeys )
327349}
328350
329- # Function for creation of df for xaxis redraw for float_contrast FALSE plot
351+ # ' Generates df for xaxis redraw for float_contrast = FALSE plot
352+ # '
353+ # ' This function generates data frames that
354+ # ' define the positions of lines and ticks on an x-axis for when float_contrast = FALSE
355+ # ' to produce a Cumming estimation plot.
356+ # '
357+ # ' @param idx List of vectors of control-test groupings that determines the arrangement
358+ # ' of the final dataframe output.
359+ # '
360+ # ' @returns dataframe
361+ # ' @noRd
330362create_dfs_for_xaxis_redraw <- function (idx ) {
331363 x_axis_pointer <- 0
332364 xaxis_line_x_vector <- c()
@@ -359,6 +391,16 @@ create_dfs_for_xaxis_redraw <- function(idx) {
359391 return (dfs_for_xaxis_redraw )
360392}
361393
394+ # ' Generates df for proportion bar component
395+ # '
396+ # ' This function generates data frames to
397+ # ' represent bars with proportional data in a graphical display.
398+ # '
399+ # ' @param bar_width Numeric value determining the width of the bar in the sankey diagram.
400+ # ' @param gap Integer value specifying the amount of gap for each tufte line.
401+ # '
402+ # ' @returns dataframe
403+ # ' @noRd
362404create_dfs_for_proportion_bar <- function (proportion_success , bar_width = 0.3 , gap = 0 ) {
363405 df_for_proportion_bar <- data.frame (
364406 x_failure = NA ,
@@ -401,6 +443,18 @@ create_dfs_for_proportion_bar <- function(proportion_success, bar_width = 0.3, g
401443 return (df_for_proportion_bar )
402444}
403445
446+ # ' Generates df for baseline violin plot WITH flow = TRUE
447+ # '
448+ # ' This function generates data frames to represent
449+ # ' data points for plotting violin plots
450+ # '
451+ # ' @param boots Boot result obtained from boot.ci
452+ # ' @param x_idx_position Numeric value determining the position of the plots on the x-axis.
453+ # ' @param float_contrast Boolean value determining if a Gardner-Altman plot or Cumming estimation plot will be produced.
454+ # ' @param flow Boolean value determining whether the bars will be plotted in pairs.
455+ # '
456+ # ' @return dataframe
457+ # ' @noRd
404458create_dfs_for_baseline_ec_violin <- function (boots , x_idx_position , float_contrast , flow = TRUE ) {
405459 df_for_violin <- data.frame (
406460 x = NA ,
0 commit comments