Barplot with errorbars Using summary_stat() function in ggplot2 and R programming

  Рет қаралды 628

Rajendra Choure

Rajendra Choure

Күн бұрын

#barplot #datavisualization #datascience #rprogramming #ggplot2 #datavisualization #summarystat
In this video i have demonstrated use of summaey_stat() function with ggoplot() to get barplots with errorbars. I have demonstrated grouped barplot with errorbars also.
with this approach explicit computation of summar statstics like mean and sd using group_by() and summarize() functions is not required. A lot of time is saved.
#code
head(iris)
summary(iris)
library(ggplot2)
ggplot(iris,aes(Species,Sepal.Length))+
stat_summary(fun="mean", geom="col")+
stat_summary(fun.data="mean_se",geom="errorbar", width=0.2, size=1)+
theme_classic()
library(tidyr)
iris_long = pivot_longer(iris,cols=1:4, values_to = "Length",names_to = "Measurement")
ggplot(iris_long,aes(Species,Length,fill=Measurement))+
stat_summary(fun="mean", geom="col", position = "dodge")+
stat_summary(fun.data="mean_se",geom="errorbar", width=0.2, size=1, position = position_dodge(width=0.9))+
theme_classic()
Facebook page:
/ rajendrachoureisc
Mail Id:
rajuchoure@gmail.com
youtube playlist:
• R programming tutorials

Пікірлер: 2
@hikikomorihachiman7491
@hikikomorihachiman7491 2 ай бұрын
Thank you sir
@DevResearch
@DevResearch 2 ай бұрын
It's my pleasure.
Fitting linear regression model and prediction in R programming
11:20
Worst flight ever
00:55
Adam W
Рет қаралды 8 МЛН
My daughter is creative when it comes to eating food #funny #comedy #cute #baby#smart girl
00:17
Creating a stacked barchart in R with ggplot2 (CC102)
22:19
Riffomonas Project
Рет қаралды 33 М.
Visualizations of Qualitative Variables
23:57
Asif
Рет қаралды 543
Describe and Summarise your data
19:44
R Programming 101
Рет қаралды 54 М.
ggplot made easy: Analyzing Distributions with R and ggplot2
21:21
Rajendra Choure
Рет қаралды 852
Make an apa-style bar graph in ggplot2
22:50
ggplot2tor
Рет қаралды 17 М.
Error Bars using R programming
12:37
R Programming 101
Рет қаралды 11 М.
🚨 YOU'RE VISUALIZING YOUR DATA WRONG. And Here's Why...
17:11
Adam Finer - Learn BI Online
Рет қаралды 155 М.
Worst flight ever
00:55
Adam W
Рет қаралды 8 МЛН