Plotting variations
The preparation is done; now let's explore stat_summary().
Summary statistics refers to a combination of location (mean or median) and spread (standard deviation or confidence interval).
These metrics are calculated in stat_summary() by passing a function to the fun.data argument. mean_sdl(), calculates multiples of the standard deviation and mean_cl_normal() calculates the t-corrected 95% CI.
Arguments to the data function are passed to stat_summary()'s fun.args argument as a list.
The position object, posn_d, and the plot with jittered points, p_wt_vs_fcyl_by_fam_jit, are available.
Cet exercice fait partie du cours
Intermediate Data Visualization with ggplot2
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
p_wt_vs_fcyl_by_fam_jit +
# Add a summary stat of std deviation limits
___