R, ggplot, and Simple Linear Regression

Begin to use R and ggplot while learning the basics of linear regression
Free tutorial
Rating: 4.8 out of 5 (3,748 ratings)
43,327 students
2hr 14min of on-demand video
English [Auto], Korean [Auto]

Install R and RStudio
Create vectors and data frames in R
Plot points and lines with ggplot
Access vectors from data frames
Group with ggplot
Plot residual lines with ggplot
Fit a least squares line to a data set
Use a least squares line for prediction


  • You will need to install both R and RStudio on your computer. We will, however, cover this in the first lecture.


Data science skills are in much demand today, but it is not just the mathematicians, statisticians, and the computer scientists who can benefit from acquiring them. Data science skills are for everyone!

In this course, I help you to begin using R, one of the most important tools in data science, and the excellent graphics package for R, ggplot2. Along the way, I also show you the basics of simple linear regression.

There are no prerequisites. We begin with installation of R and RStudio, and I introduce R and ggplot skills as they are needed as we progress toward an understanding of linear regression.

Students should be able to complete the course within two weeks, working at an easy pace.

Linear regression is a machine learning technique. I hope to create more courses like this one in the future, teaching machine learning, R, ggplot, dplyr, and programming, all at the same time.

Who this course is for:

  • This course is for beginners interested in using R.
  • This course is for beginners interested in learning about the graphics package ggplot2.
  • This course is for beginners interested in learning some basics of linear regression.
  • This course is NOT for those with a background in statistics who use R and are familiar with ggplot2.


Professor at Mercyhurst University
Charles Redmond
  • 4.6 Instructor Rating
  • 6,794 Reviews
  • 85,534 Students
  • 7 Courses

Dr. Charles Redmond is a professor in the Tom Ridge School of Intelligence Studies and Information Science at Mercyhurst University. He has been a member of the Department of Mathematics and Computer Systems at Mercyhurst for 21 years and has recently completed a term as chair of the department. Dr. Redmond received his PhD in mathematics from Lehigh University in 1993 and has published in the Annals of Applied Probability, the Journal of Stochastic Processes and Their Applications, Mathematics Magazine, the College Mathematics Journal, and Mathematics Teacher. In his spare time he enjoys making music and computer generated art, reading, and owning a Clumber Spaniel.

Top companies trust Udemy

Get your team access to Udemy's top 26,000+ courses