This is a simple linear regression example implemented in R.
This is an R implementation of the spreadsheet linear regression example shown on the Angie Teaches YouTube channel. It will calculate the regression equation, R^2, and generate a plot of the regression line.
- You will need to install R, perhaps R Studio (which I used) and the
ggplot2R library.
- Upload the
regression.Rprogram to your working directory. - In your local working directory be sure to install the ggplot2 library
install.packages("ggplot2")
- Set your local working directory
- Use the source command to run the program
source("regression.R")
Joe Domaleski
- 0.1
- Initial Release
This project is licensed under the GNU GPL 3 License - see the LICENSE.md file for details
Originally implemented by Angie Teaches and detailed in the following YouTube video: https://youtu.be/JHxC1i3fEAI?feature=shared