11# ' Make a SuperPlot
22# '
3+ # ' @description
4+ # ' The function \code{superplot} creates a SuperPlot using \code{ggplot2}.
5+ # '
36# ' @param df data frame with at least three columns: meas, cond, repl
47# ' @param meas character name of column with measurement (e.g. intensity)
58# ' @param cond character name of column with condition (e.g. Control, WT)
69# ' @param repl character name of column with replicate (e.g. unique experiment
7- # ' identifiers)
10+ # ' identifiers)
811# ' @param pal name of colour palette to use (default is "tol_bright")
912# ' @param xlab string for x label (default is empty)
1013# ' @param ylab string for y label (default is "Measurement")
1114# ' @param datadist string for data distribution to use, select ("sina" default,
12- # ' "jitter", or "violin")
15+ # ' "jitter", or "violin")
1316# ' @param size numeric vector of size range data and summary points (default is
14- # ' c(2, 3))
17+ # ' c(2, 3))
1518# ' @param alpha numeric vector of alpha range data and summary points (default
16- # ' is c(0.5, 0.7))
17- # ' @param bars string for type of error bars to add, select ("none" default,
18- # ' "mean_sd", "mean_sem", or "mean_ci")
19+ # ' is c(0.5, 0.7))
20+ # ' @param bars string for type of error bars to add, select "mean_sd" (default),
21+ # ' "mean_sem", or "mean_ci"; for no bars use an empty string (""); for no
22+ # ' error bars but still show the mean with a crossbar, use "none".
1923# ' @param linking logical for whether to link summary points between conditions
20- # ' (default is FALSE)
24+ # ' (default is FALSE)
2125# ' @param fsize numeric font size for text (default is 12)
2226# ' @param shapes logical for whether to use different shapes for replicates
2327# ' @param rep_summary string for summary statistic to use for replicates, select
24- # ' ("rep_mean" default, or "rep_median")
28+ # ' ("rep_mean" default, or "rep_median")
2529# ' @param gg ggplot object to add to (default is NULL)
2630# ' @param stats logical for whether to add statistical tests (default is FALSE)
2731# ' @param stats_test string for statistical test to use, select
28- # ' ("para_unpaired", "para_paired", "nonpara_unpaired", or "nonpara_paired")
32+ # ' ("para_unpaired", "para_paired", "nonpara_unpaired", or "nonpara_paired")
2933# ' @param info logical for whether to print information about the plot (default
30- # ' is FALSE)
34+ # ' is FALSE)
3135# '
3236# ' @return ggplot object
3337# ' @import ggplot2
@@ -50,7 +54,7 @@ superplot <- function(df,
5054 datadist = " sina" ,
5155 size = c(2 , 3 ),
5256 alpha = c(0.5 , 0.7 ),
53- bars = " " ,
57+ bars = " mean_sd " ,
5458 linking = FALSE ,
5559 rep_summary = " rep_mean" ,
5660 shapes = FALSE ,
0 commit comments