See the lm() function.
lm()
Past that, please review the forum's homework policy.
FAQ: Homework Policy