The ASTA team
mylm <- lm(SleepHrs ~ Age, data = DF)
summary(mylm)## 
## Call:
## lm(formula = SleepHrs ~ Age, data = DF)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -3.728 -0.917 -0.102  1.338  3.505 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -15.0791     3.4825   -4.33  3.6e-05 ***
## Age           0.4644     0.0661    7.02  2.9e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.7 on 98 degrees of freedom
## Multiple R-squared:  0.335,  Adjusted R-squared:  0.328 
## F-statistic: 49.3 on 1 and 98 DF,  p-value: 2.86e-10
Read data:
rio: A Swiss-Army Knife for Data I/O
rio: A Swiss-Army Knife for Data I/Oreadxl (part of rio)Demo