Our second R script is a simple two variable regression model which predicts womens height based upon weight.
Begin by creating another R script by selecting File | New File | R Script from the top navigation bar. If you create new scripts via File | New File | R Script often enough you might get Click Fatigue (uses three clicks), so you can also save a click by selecting the icon in the top left with the + sign:
Whichever way you choose , a new blank script window will appear with the name Untitled2.
Now paste the following code into the new script window:
require(graphics)data(women)lm_output <- lm(women$height ~ women$weight) ...