Learn R Programming

sbpiper (version 1.9.0)

plot_combined_tc: Plot repeated time courses in the same plot with mean, 1 standard deviation, and 95% confidence intervals.

Description

Plot repeated time courses in the same plot with mean, 1 standard deviation, and 95% confidence intervals.

Usage

plot_combined_tc(df, g = ggplot(), title = "", xaxis_label = "",
  yaxis_label = "", bar_type = "mean", alpha = 1, yaxis.min = NULL,
  yaxis.max = NULL)

Arguments

df

a data frame

g

the current ggplot to overlap

title

the title

xaxis_label

the xaxis label

yaxis_label

the yaxis label

bar_type

the type of bar ("mean", "mean_sd", "mean_sd_ci95")

alpha

the amount of alpha transparency

yaxis.min

the lower limit for the y axis

yaxis.max

the upper limit for the y axis

Value

the plot

Examples

Run this code
# NOT RUN {
data(insulin_receptor_1)
data(insulin_receptor_2)
data(insulin_receptor_3)
df <- data.frame(Time=insulin_receptor_1[,1], 
                 X1=insulin_receptor_1[,2], 
                 X2=insulin_receptor_2[,2], 
                 X3=insulin_receptor_3[,2])
plot_combined_tc(df=df, 
                 xaxis_label="Time [m]", yaxis_label="Level [a.u.]", 
                 bar_type="mean", alpha=1, yaxis.min=NULL, yaxis.max=NULL)
plot_combined_tc(df=df, 
                 xaxis_label="Time [m]", yaxis_label="Level [a.u.]", 
                 bar_type="mean_sd", alpha=1, yaxis.min=NULL, yaxis.max=NULL)
plot_combined_tc(df=df, 
                 xaxis_label="Time [m]", yaxis_label="Level [a.u.]", 
                 bar_type="mean_sd_ci95", alpha=0.3, yaxis.min=NULL, yaxis.max=NULL)
# }

Run the code above in your browser using DataLab