Regression command

# 'practice' dependent variable, 'score' independent variable
fit <- lm(score ~ practice)

Example code

practice <- 21:100
score <- 20 + 2 * hours + rnorm(n=80,mean=0,sd=20)
plot(practice,score)
fit <- lm(score ~ practice)
lines(practice, predict(fit), col='orange')

References

http://www.cyclismo.org/tutorial/R/linearLeastSquares.html

http://www.cerebralmastication.com/2010/09/principal-component-analysis-pca-vs-ordinary-least-squares-ols-a-visual-explination/

http://zoonek2.free.fr/UNIX/48_R/09.html#7