Creating bar plot with error bars using ggplot2's stat_summary in R (CC318)

  Рет қаралды 671

Riffomonas Project

Riffomonas Project

Күн бұрын

Пікірлер: 12
@luckybarrel7829
@luckybarrel7829 Ай бұрын
There is an inbuilt function for sd. It's called mean_sdl. The default is mean +/- 2SD, so you need to pass on arguments to get mean +/- 1SD. So the function will look like: stat_summary(fun.data = "mean_sdl", fun.args = list(mult = 1), geom = "errorbar", width = 0.4) That list(mult = 1) is the multiples of SD that should be computed, and by default it is kept to 2 since looking at overlap of errorbars plotted with 2SD gives a good indication whether a result is significantly different or not by a t-test.
@zgl9764
@zgl9764 2 ай бұрын
Great video, I really enjoy watching you code!
@Riffomonas
@Riffomonas 2 ай бұрын
My pleasure - thanks for watching!
@erikp6614
@erikp6614 Ай бұрын
Very nice video!!! As an alternative to changing the y axis (around 25:40) one can use the expansion function. The expansion function let you choose multiplicative and additive expansion of the y axis.
@Riffomonas
@Riffomonas Ай бұрын
Thanks - I personally find expansion() not super intuitive. I'll have to keep working with it
@lucasamoroso92
@lucasamoroso92 2 ай бұрын
Great video! I wish patterns within graphs were more natural to ggplot syntax, there are cases where they can be very useful (not in this case though haha)
@Riffomonas
@Riffomonas 2 ай бұрын
Thanks! Stay tuned for Wednesday's video 🤓
@ColinDdd
@ColinDdd 2 ай бұрын
the whole thing where error bars sometimes are standard error and sometimes standard deviation is so weird to me. what is the story with that! i ran into this trying to see what geom_errorbar(stat="summary") was doing, i think it is +/- one standard error, similar to what you saw with it defaulting to mean_se(). i guess sometimes good to see the underlying distribution vs the simple bar :) also pretty odd that you have to manually place the error bar, i wonder if there is a more natural way to get it to the right center position. but as always, great video!
@Riffomonas
@Riffomonas 2 ай бұрын
Thanks for watching! It seems everyone has a different opinion on SD/SE 🤣
@zgl9764
@zgl9764 2 ай бұрын
Great video, I really enjoy watching you code!
@Riffomonas
@Riffomonas 2 ай бұрын
Glad to hear it! 🤓
Adding patterns to barplots with ggpattern and ggplot2 in R (CC319)
38:52
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Bar charts and Histograms using ggplot in R
18:22
R Programming 101
Рет қаралды 71 М.
I am not sorry for switching to C
11:34
Sheafification of G
Рет қаралды 170 М.
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 441 М.
Error Bars using R programming
12:37
R Programming 101
Рет қаралды 12 М.
Going for simple with ggplot2 and dplyr (CC320)
30:58
Riffomonas Project
Рет қаралды 1,1 М.