Skip to content

Commit a4ddde6

Browse files
authored
Merge pull request #151 from sunroofgod/v2023.9.12
v2023.9.12 as per CRAN
2 parents 21ed407 + adac0b3 commit a4ddde6

File tree

2 files changed

+28
-27
lines changed

2 files changed

+28
-27
lines changed

R/002_df_for_plots.R

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,17 @@
1-
#' Helper functions that generate dfs for tuftelines plot
2-
#'
3-
#' @noRd
4-
#'
1+
#' Generates the dataframe requires for the tufte lines plot component in raw plots.
2+
#'
3+
#' This function returns a dataframe with summary statistics, such as mean, standard
4+
#' deviation and quantiles (depending on the effect size) based on the input dataset.
5+
#'
56
#' @param raw_data The tidy dataset passed to [load()] that was cleaned and altered for plotting.
67
#' @param enquo_x Quosure of x as initially passed to [load()].
78
#' @param enquo_y Quosure of y as initially passed to [load()].
89
#' @param proportional Boolean value as initially passed to [load()].
9-
#' @param float_contrast Default TRUE. If TRUE, a Gardner-Altman plot will be produced.
10-
#' If FALSE, a Cumming estimation plot will be produced.
11-
#' @param enquo_id_col Quosure of id_col as initially passed to [load()].
12-
#' @param idx The list of control-test groupings as initially passed to [load()].
13-
#' @param tufte_lines_df Dataset for the creation of tufte lines.
14-
#' @param proportional_data List of calculations related to the plotting of proportion plots.
15-
#' @param scale_factor_sig Decimal value ranging from 0 to 1 which determines the significance of the scale factor.
16-
#' @param bar_width Numeric value determining the width of the bar in the sankey diagram or proportion plots.
17-
#' @param gap Numeric value determining the space between the bars in the sankey diagram or proportion plots.
18-
#' @param sankey Boolean value determining if the flows between the bar charts will be plotted.
19-
#' @param flow Boolean value determining whether the bars will be plotted in pairs.
20-
#' @param N The number of rows in the proportional dataset.
21-
#' @param proportion_success The proportion or ratio of values that are 1.
22-
#' @param boots Boot result obtained from boot.ci
23-
#' @param x_idx_position Numeric value determining the position of the plots on the x-axis.
10+
#' @param gap Integer value specifying the amount of gap for each tufte line.
11+
#' @param effsize_type String value specifying type of effect size.
2412
#'
25-
#' @details
26-
#' Contains functions `df_for_tufte`, `create_dfs_for_sankey`, `create_dfs_for_xaxis_redraw`, `create_dfs_for_proportion_bar` for generation of dfs.
27-
#'
28-
#' @return
29-
#' Various dfs which is required for the plotting functions to obtain a complete dabest plot.
13+
#' @returns a dataframe for plotting of the tufte lines plot component.
14+
#' @noRd
3015
create_df_for_tufte <- function(raw_data, enquo_x, enquo_y, proportional, gap, effsize_type) {
3116
tufte_lines_df <- raw_data %>%
3217
dplyr::group_by(!!enquo_x) %>%
@@ -67,8 +52,19 @@ create_df_for_tufte <- function(raw_data, enquo_x, enquo_y, proportional, gap, e
6752

6853
return(tufte_lines_df)
6954
}
70-
71-
# Function for creation of df for flow = FALSE plot
55+
#' Generates df for tufte lines plot component for raw plot WITH flow = FALSE.
56+
#'
57+
#' This function rearranges and duplicates rows in a given dataframe (containing
58+
#' summary statistics) in the order of the unlisted given list of vectors.
59+
#'
60+
#' @param idx List of vectors of control-test groupings that determines the arrangement
61+
#' of the final dataframe output.
62+
#' @param tufte_lines_df dataframe for plotting of the tufte lines plot component as
63+
#' generated by [create_df_for_tufte()].
64+
#' @param enquo_x Quosure of x as initially passed to [load()].
65+
#'
66+
#' @returns dataframe
67+
#' @noRd
7268
create_dfs_for_nonflow_tufte_lines <- function(idx,
7369
tufte_lines_df,
7470
enquo_x) {

cran-comments.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Resubmission
2+
This is a resubmission. In this version I have:
3+
4+
* Contacted the maintainers of affected package(s) >= 2 weeks ago.
5+
16
## R CMD check results
27

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

4348
* permubiome (NA)
4449

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

0 commit comments

Comments
 (0)