HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How to Add Error Bars in ggplot in R – Demonstration

7,878 views October 26, 2019 5:11

Watch on YouTube
ChannelMonika Wahi

Description from the creator

*Note: I may be compensated, but you will not be charged, if you click on the links below.

In this video, Monika Wahi shows you how to add error bars to a bar plot in ggplot2 in Windows R GUI.
💿 Previous video where I make the plot dataframe: youtu.be/FVIeni1QMrw
📀 Previous video where I recolor the plot: youtu.be/6iq9hXLZc80
💿 Github link to files: buff.ly/3TcL2pg
📀 Related blog post showing you how to use an image to inspire a color palette in R: buff.ly/3ehoiWo
💿 Related blog post about adding error bars: buff.ly/3esitFA
📀 Monika’s courses on LinkedIn Learning: linkedin-learning.pxf.io/NKN0JO

WANT TO SUPPORT MONIKA ON SOCIAL MEDIA?
❤️Subscribe to Monika's YouTube channel: buff.ly/2W6ijuc
🧡Follow/connect with Monika on LinkedIn: linkedin.com/in/dethwench/
💛Follow Monika on Twitter: twitter.com/PHExaminer
💚Try Monika’s courses on LinkedIn Learning: linkedin-learning.pxf.io/NKN0JO
💙Try Monika's boutique research methods and data science courses here: buff.ly/3zM243P

00:27 Watch the previous video where I make the dataframe for the plot: youtu.be/FVIeni1QMrw and the one where I recolor the plot: youtu.be/6iq9hXLZc80
00:56 Reviewing contents of dataframe to understand the values and variables. The standard error (SE) values for the error bars should be in the dataframe.
01:52 Code for the color vector and for the plot – showing how to utilize the vector
02:38 Adding the geom_errorbar line at the end to call out the error bars
03:04 How to adjust the size of the SE being used for the error bar.
03:39 Comparing doing math in plot commands compared to hardcoding data first and then calling up values from variables.
04:13 Code that formats the actual error bar
04:33 Running the plot.
Source article: buff.ly/3CkEWwq

How to Add Error Bars in ggplot in R – Demonstration

About this tutorial

Monika Wahi published this 5:11 video tutorial on October 26, 2019. It has been watched 7,878 times on YouTube.

Duration
5:11
Published
October 26, 2019
Views
7,878
Likes
157

Tags

Share

Further reading

This tutorial in other languages